Skip to content
Documentation
Command

/start-11-5

Lesson command

From plugin
ai-agent-camp
345200 skills8 agents200 commands
Install
$ npx -y skills add minicoohei/ai-agent-camp --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/start-11-5

Context preview

What this command does when you run it.

Lesson command

Command definition

start-11-5.md
description: "Lesson command"
chapter: "courses/aiagent/lesson03-core/module11-github-actions"
duration: "約25分"
prerequisites: ["start-11-1"]
level: "intermediate"
tags: ["github-actions", "deploy", "artifact", "release", "vercel", "github-pages"]
nonInteractiveMode: deferred

🎓 Lesson 11-5: GitHub Actions でデプロイ・ファイル生成

📍 このセッションでやること

**Lesson 11-5: GitHub Actions でデプロイ・ファイル生成** へようこそ!

| 項目 | 内容 | |------|------| | ゴール | GitHub Actions でビルド成果物の生成、GitHub Pages / Vercel へのデプロイ、リリースノート自動生成を行う | | 所要時間 | 約25分 | | 使うスキル | GitHub Actions, GitHub Pages, Vercel CLI, gh CLI | | 前提条件 | Lesson 11-1 完了(ワークフロー基本の理解) |

**このセッションの流れ:** 1. ビルド成果物の生成スクリプト 2. artifact としてのアップロード・保存 3. GitHub Pages へのデプロイ 4. Vercel 自動デプロイ 5. リリースノート自動生成

セッション終了時には、ビルド→デプロイ→リリースの自動化パイプラインが構築されています。

> **💡 ヒント**: AIの応答が途中で止まった場合は「続きを表示して」「止まってるよ」と入力すると再開します。

---

🎯 準備チェック

**AskQuestionの設定:**

{
  "title": "🎯 セッション開始前の確認",
  "questions": [{
    "id": "readiness",
    "prompt": "準備はできていますか?",
    "options": [
      {"id": "ready", "label": "準備OK!始めましょう"},
      {"id": "check_prereq", "label": "前提条件を確認したい"},
      {"id": "different_lesson", "label": "別のレッスンに移動したい"}
    ]
  }]
}

(ready → Step 1へ) (check_prereq → Lesson 11-1 完了確認) (different_lesson → モジュール一覧を表示)

---

🚀 Step 1: ビルド成果物の生成

{
  "title": "🚀 Step 1: ビルド成果物生成",
  "questions": [{
    "id": "step_action",
    "prompt": "Python / Node スクリプトで静的ファイルを生成するステップを作成します。",
    "options": [
      {"id": "practice", "label": "このまま進める"},
      {"id": "review", "label": "ビルド成果物の種類を確認"},
      {"id": "skip", "label": "スキップ"}
    ]
  }]
}

**選択後の案内(例)**:

`tools/build_site.py` を作成(簡単な静的サイトジェネレーター):

#!/usr/bin/env python3
"""簡易静的サイトジェネレーター"""
import os
import json
from datetime import datetime

def build():
    os.makedirs("dist", exist_ok=True)
    
    # index.html 生成
    html = f"""<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <title>AI Agent Camp — ビルド成果物</title>
  <style>
    body {{ font-family: sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; }}
    .meta {{ color: #666; font-size: 0.9rem; }}
  </style>
</head>
<body>
  <h1>AI Agent Camp</h1>
  <p class="meta">ビルド日時: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}</p>
  <p>GitHub Actions で自動生成されたページです。</p>
</body>
</html>"""
    
    with open("dist/index.html", "w") as f:
        f.write(html)
    
    # build-info.json 生成
    info = {
        "built_at": datetime.utcnow().isoformat(),
        "commit": os.environ.get("GITHUB_SHA", "local"),
        "ref": os.environ.get("GITHUB_REF", "local"),
    }
    with open("dist/build-info.json", "w") as f:
        json.dump(info, f, indent=2)
    
    print("ビルド完了: dist/ ディレクトリに成果物を生成しました")

if __name__ == "__main__":
    build()
python tools/build_site.py && ls -la dist/

**期待される結果**: `dist/` ディレクトリに `index.html` と `build-info.json` が生成される。

---

🚀 Step 2: artifact のアップロード・保存

{
  "title": "🚀 Step 2: artifact 管理",
  "questions": [{
    "id": "step_action",
    "prompt": "ビルド成果物を GitHub Actions artifact として保存するワークフローを作成します。",
    "options": [
      {"id": "practice", "label": "このまま進める"},
      {"id": "review", "label": "artifact の仕組みを確認"},
      {"id": "skip", "label": "スキップ"}
    ]
  }]
}

**選択後の案内(例)**:

`.github/workflows/build-and-deploy.yml` を作成:

name: Build and Deploy
on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Build site
        run: python tools/build_site.py

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: site-build-${{ github.run_number }}
          path: dist/
          retention-days: 30

      - name: Build summary
        run: |
          echo "## ビルド成果物" >> $GITHUB_STEP_SUMMARY
          echo "| ファイル | サイズ |" >> $GITHUB_STEP_SUMMARY
          echo "|---------|-------|" >> $GITHUB_STEP_SUMMARY
          for f in dist/*; do
            SIZE=$(wc -c < "$f" | tr -d ' ')
            echo "| $(basename $f) | ${SIZE} bytes |" >> $GITHUB_STEP_SUMMARY
          done

**ポイント:**

  • `actions/upload-artifact@v4` でビルド成果物を保存
  • `retention-days` で保持期間を指定(デフォルト90日)
  • `$GITHUB_STEP_SUMMARY` でワークフローサマリにビルド情報を表示

**期待される結果**: ワークフロー実行後、Actions タブの Summary に artifact ダウンロードリンクが表示される。

---

🚀 Step 3: GitHub Pages へのデプロイ

{
  "title": "🚀 Step 3: GitHub Pages デプロイ",
  "questions": [{
    "id": "step_action",
    "prompt": "ビルド成果物を GitHub Pages にデプロイします。",
    "options": [
      {"id": "practice", "label": "このまま進める"},
      {"id": "review", "label": "GitHub Pages の設定方法を確認"},
      {"id": "skip", "label": "スキップ"}
    ]
  }]
}

**選択後の案内(例)**:

ワークフローに Pages デプロイジョブを追加:

  deploy-pages:
    needs: build
    runs-on: ubuntu-latest
    permissions:
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Build site
        run: python tools/build_site.py

      - name: Setup Pages
        uses: actions/configure-pages@v5

      - name: Upload Pages artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: dist/

      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

**事前設定:** 1. リポジトリの Settings → Pages 2. Source: 「GitHub Actions」を選択

**期待される結果**: `https://<owner>.github.io/<repo>/` でサイトが公開される。

---

🚀 Step 4: Vercel 自動デプロイ

{
  "title": "🚀 Step 4: Vercel デプロイ",
  "questions": [{
    "id": "step_action",
    "prompt": "Vercel CLI を使って GitHub Actions からデプロイします。",
    "options": [
      {"id": "practice", "label": "このまま進める"},
      {"id": "review", "label": "Vercel の設定方法を確認"},
Read more
Ships withai-agent-camp

AI Agent Training for Non-Engineers - Complete Guide to Claude Code / Cursor / Codex ### ⚠️ Before you clone Official repository (maintained by the authors): Running AI agents from this repo grants them shell, file-write, and external-API permissions on your

Get the whole plugin