Skip to content

Remove past-project references from the eval fixture; add a Code of C… #69

Remove past-project references from the eval fixture; add a Code of C…

Remove past-project references from the eval fixture; add a Code of C… #69

Workflow file for this run

name: Deploy Docs
on:
push:
branches: [main]
paths:
- "docs/**"
- "README.md"
- "CONTRIBUTING.md"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- "README.md"
- "CONTRIBUTING.md"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
with:
python-version: "3.12"
- run: uv sync --locked --extra docs
- run: uv run --extra docs mkdocs build --strict
env:
# mkdocs-material prints an advisory about upstream MkDocs 2.0 on every
# build. It is not a defect here: pyproject pins mkdocs<2, so the
# incompatibility it warns about cannot arise. NO_MKDOCS_2_WARNING is
# the vendor's own documented off-switch (material/plugins/__init__.py).
# justfile already sets this; CI must match or the two gates disagree.
NO_MKDOCS_2_WARNING: "1"
deploy:
# Publishes the built site straight from a workflow artifact. This used to
# run `mkdocs gh-deploy --force`, which pushed the rendered HTML to a
# gh-pages branch -- and since Pages was never enabled on the repository
# (has_pages: false, and the site_url returned 404), that branch was
# write-only: CI regenerated it on every docs push and nothing served it.
# Deploying from an artifact keeps the source in main, keeps build output
# out of git entirely, and removes the branch from the picture.
if: github.event_name == 'push'
needs: build
permissions:
pages: write # deploy to the Pages environment
id-token: write # OIDC token the deploy action verifies with
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4
with:
python-version: "3.12"
- run: uv sync --locked --extra docs
- run: uv run --extra docs mkdocs build --strict
env:
NO_MKDOCS_2_WARNING: "1"
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: site
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5