production loads #46
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/site/**" | |
| - "docs/figures/**" | |
| - "src/kvboost/**" | |
| - "crates/**" | |
| - ".github/workflows/site.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # generate_manifest reads git metadata | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Generate manifest | |
| run: | | |
| python docs/site/generate_manifest.py | |
| test -s docs/site/manifest.json | |
| - name: Stage site | |
| run: | | |
| # generate_manifest.py already copies docs/figures/ → docs/site/figures/ | |
| # so the site dir is self-contained; just publish it as-is. | |
| mkdir -p _site | |
| cp -r docs/site/* _site/ | |
| ls -la _site/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |