name: Update Documentation on: push: branches: - main paths: - 'packages/**' - 'apps/**' - 'templates/**' - '!**/*.md' jobs: update-docs: runs-on: ubuntu-latest permissions: contents: write pull-requests: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 2 - name: Get changed files id: changed run: | echo "files=$(git diff --name-only HEAD~1 HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - name: Run Claude Code uses: anthropics/claude-code-action@beta continue-on-error: true with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: | Analyze the recent code changes and update any relevant documentation. Changed files: ${{ steps.changed.outputs.files }} Tasks: 1. Read the changed files to understand what was modified 2. Check if any README files, doc pages, or code comments need updating 3. Update documentation to reflect the code changes 4. Keep docs concise and accurate Focus on: - API changes that affect usage examples - New features that need documentation - Changed behavior that affects existing docs - Executor template documentation (templates/vercel-executor/README.md) - Package READMEs in packages/ Only make changes if documentation is actually out of sync with code. If no documentation updates are needed, do nothing. - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'docs: auto-update documentation based on code changes' title: 'docs: Auto-update documentation' body: | This PR was automatically generated by Claude Code to update documentation based on recent code changes. Please review the changes before merging. branch: auto-docs-update delete-branch: true