repo-updated #328
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
| name: Sync Documentation | |
| on: | |
| repository_dispatch: | |
| types: [repo-updated] | |
| schedule: | |
| - cron: '0 9 * * 1' # Every Monday 9 AM UTC | |
| workflow_dispatch: | |
| inputs: | |
| repo: | |
| description: 'Repo to update (or "all" for full rebuild)' | |
| default: 'all' | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: docs-deploy | |
| cancel-in-progress: true | |
| jobs: | |
| sync-and-deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: uv sync --extra llm | |
| - name: Sync READMEs | |
| run: uv run python scripts/sync_readmes.py | |
| - name: Aggregate changelogs | |
| run: uv run python scripts/aggregate_changelog.py | |
| - name: Generate What's New | |
| run: uv run python scripts/generate_whats_new.py | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build architecture overview | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| run: uv run python scripts/build_architecture.py | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| - name: Validate | |
| run: uv run python scripts/validate_docs.py | |
| - name: Build MkDocs site | |
| run: uv run mkdocs build --strict 2>&1 || uv run mkdocs build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site/ | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@v4 | |
| - name: Commit updated docs source | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/ | |
| git diff --staged --quiet || git commit -m "docs: auto-sync documentation [skip ci]" | |
| git push |