Skip to content

Automated documentation updates #1

Automated documentation updates

Automated documentation updates #1

Workflow file for this run

# ============================================================================
# Improve Documentation (AI-driven)
# ============================================================================
# Runs daily (or on demand). Pulls the GDevelop repo, reads what has already
# been improved in automated_updates_data.json, and uses an AI agent to
# improve a DIFFERENT aspect of the documentation each run.
#
# 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: Improve documentation"
on:
schedule:
- cron: "0 10 * * *" # Every day at 10:00 UTC (offset from the other workflow)
workflow_dispatch: # Manual trigger
pull_request: # Testing
permissions:
contents: write
pull-requests: write
jobs:
improve-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 improvement script ────────────────────────────────────
- name: Improve documentation
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/improve-docs.js
# ── Create Pull Request ───────────────────────────────────────────
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: AI-driven documentation improvement"
title: "Auto: Improve documentation"
body: |
This PR was automatically generated by the **Improve documentation** workflow.
An AI coding agent inspected the [GDevelop](https://github.com/4ian/GDevelop) codebase
and the existing documentation, then chose an aspect to improve.
The updated `automated_updates_data.json` tracks what was improved so future
runs will pick a different area.
**Please review the changes carefully before merging.**
branch: auto/improve-docs
delete-branch: true
labels: automated,documentation