Automated documentation updates #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================================================================ | |
| # Update Documentation from GDevelop Commits | |
| # ============================================================================ | |
| # Runs daily (or on demand). Pulls the GDevelop repo, inspects recent commits | |
| # since the last tracked commit, and uses an AI agent (Claude Code by default, | |
| # Codex as an alternative) to update the docs accordingly. | |
| # | |
| # To switch from Claude Code to Codex: | |
| # 1. Change AI_PROVIDER to "codex" | |
| # 2. Comment out the "Install Claude Code" step and uncomment "Install Codex" | |
| # 3. Swap the API key secrets (comment ANTHROPIC_API_KEY, uncomment OPENAI_API_KEY) | |
| # ============================================================================ | |
| name: "Auto: Update docs from GDevelop commits" | |
| on: | |
| schedule: | |
| - cron: "0 8 * * *" # Every day at 08:00 UTC | |
| workflow_dispatch: # Manual trigger | |
| pull_request: # Testing | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-docs: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'GDevelopApp/GDevelop-documentation' | |
| timeout-minutes: 20 | |
| steps: | |
| # ── Checkout this documentation repo ────────────────────────────── | |
| - name: Checkout documentation repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # ── Node.js ─────────────────────────────────────────────────────── | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # ── Install AI CLI ──────────────────────────────────────────────── | |
| - name: Install Claude Code | |
| run: npm install -g @anthropic-ai/claude-code | |
| # Uncomment below (and comment above) to use Codex instead: | |
| # - name: Install Codex | |
| # run: npm install -g @openai/codex | |
| # ── Run the update script ───────────────────────────────────────── | |
| - name: Update documentation from recent commits | |
| env: | |
| AI_PROVIDER: "claude" # Change to "codex" to use Codex | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| # OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: node scripts/update-docs-from-commits.js | |
| # ── Create Pull Request ─────────────────────────────────────────── | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "docs: auto-update documentation from GDevelop commits" | |
| title: "Auto: Update documentation based on recent GDevelop changes" | |
| body: | | |
| This PR was automatically generated by the **Update docs from GDevelop commits** workflow. | |
| An AI coding agent analysed recent commits in [4ian/GDevelop](https://github.com/4ian/GDevelop) | |
| and updated the documentation to reflect user-facing changes. | |
| **Please review the changes carefully before merging.** | |
| branch: auto/update-docs-from-commits | |
| delete-branch: true | |
| labels: automated,documentation |