Merge pull request #32 from appautomaton/agent/capability-contract-ha… #101
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: Deploy site | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "site/**" | |
| - "src/**" | |
| - "scripts/gen_api_docs.py" | |
| - "scripts/sync_site_docs.py" | |
| - "pyproject.toml" | |
| - ".github/workflows/deploy-site.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Astro site | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: site | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| # Griffe statically parses src/ — no MLX install, so this runs on Linux. | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v8.2.0 | |
| - name: Generate API reference | |
| working-directory: ${{ github.workspace }} | |
| run: uv run --no-project --with griffe --python 3.13.12 python scripts/gen_api_docs.py | |
| - name: Generate narrative documentation | |
| working-directory: ${{ github.workspace }} | |
| run: uv run --no-project --python 3.13.12 python scripts/sync_site_docs.py | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: site/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build site | |
| run: npm run build | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: site/dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |