Give RunDebriefer and CautionDrafter a local arm, and retire the bare name to the new default #686
Workflow file for this run
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| # Staged into docs/ at build time by scripts/stage_docs.py, so an edit | |
| # here changes published pages without touching docs/. | |
| - "CONTRIBUTING.md" | |
| - "SECURITY.md" | |
| - "README.md" | |
| - "CITATION.cff" | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| - "scripts/stage_docs.py" | |
| - "scripts/mkdocs_hooks.py" | |
| - "scripts/beamline_descriptor.py" | |
| - "scripts/beamline_pages.py" | |
| - "scripts/catalog_descriptor.py" | |
| - "scripts/catalog_pages.py" | |
| - "scripts/site_descriptor.py" | |
| - "scripts/site_pages.py" | |
| - "scripts/architecture_introspect.py" | |
| - "scripts/architecture_pages.py" | |
| - "deployments/**" | |
| - "catalog/**" | |
| - "talks/**" | |
| # The Architecture pages render their factual tables from the code via AST | |
| # introspection, so a BC / aggregate / event / slice change must redeploy docs. | |
| - "apps/api/src/cora/**" | |
| # Build (do not deploy) on PRs touching the same paths, so a dead anchor, an | |
| # un-navved page or a raising hook fails review instead of landing on main. | |
| # The CI workflow runs the tests; this one is the only thing that runs mkdocs. | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "CONTRIBUTING.md" | |
| - "SECURITY.md" | |
| - "README.md" | |
| - "CITATION.cff" | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| - "scripts/**" | |
| - "deployments/**" | |
| - "catalog/**" | |
| - "apps/api/src/cora/**" | |
| workflow_dispatch: | |
| # Allow only one concurrent deployment, no cancel-in-progress so a | |
| # late deploy still finishes (matches the pages-action recommendation). | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Install MkDocs Material and descriptor deps | |
| run: pip install --quiet "mkdocs-material==9.7.6" "pyyaml>=6,<7" "pydantic>=2.13.4,<3" | |
| - name: Stage README and CONTRIBUTING into docs/ | |
| run: python scripts/stage_docs.py | |
| - name: Build site | |
| run: mkdocs build --strict | |
| # The decks are slow to build (npm install plus a chromium download per | |
| # deck) and nothing deploys from a PR, so skip them there. The mkdocs | |
| # build above is the part a PR needs to prove. | |
| - name: Set up Node | |
| if: github.event_name != 'pull_request' | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| cache-dependency-path: "talks/*/package-lock.json" | |
| - name: Build talks | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| set -euo pipefail | |
| shopt -s nullglob | |
| for dir in talks/*/; do | |
| slug=$(basename "$dir") | |
| [ -f "$dir/package.json" ] || continue | |
| echo "::group::Building deck: $slug" | |
| ( | |
| cd "$dir" | |
| npm install --no-audit --no-fund | |
| # Belt-and-suspenders: playwright-chromium's postinstall sometimes | |
| # skips the binary download in CI. Force it before exporting. | |
| npx --yes playwright install chromium | |
| # Hash routing is required here: Pages serves the deck from a | |
| # subdirectory and honours only the site-root 404.html, so a | |
| # history-mode slide URL 404s on reload or when shared. | |
| npm run build -- --base "/cora/talks/$slug/" --router-mode hash | |
| npm run export || echo "::warning::PDF export failed for $slug; deck will ship without PDF" | |
| ) | |
| mkdir -p "site/talks/$slug" | |
| cp -R "$dir/dist/." "site/talks/$slug/" | |
| if [ -f "$dir/$slug.pdf" ]; then | |
| cp "$dir/$slug.pdf" "site/talks/$slug/$slug.pdf" | |
| fi | |
| echo "::endgroup::" | |
| done | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: site | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| # Load-bearing. The build now also runs on pull_request so a docs break is | |
| # caught before it lands; without this guard that would publish every PR's | |
| # build straight to the live site. | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |