Skip to content

fix(dc_measurements): retract the QR in-plane rotation limitation #278

fix(dc_measurements): retract the QR in-plane rotation limitation

fix(dc_measurements): retract the QR in-plane rotation limitation #278

Workflow file for this run

# SPDX-FileCopyrightText: 2022-2026 David Bensoussan
# SPDX-License-Identifier: MPL-2.0
# DC 2.0 (Jazzy) documentation build (#252). Builds the mdbook site and the strictdoc
# requirements export as a CI gate; does not deploy anywhere. GitHub Pages for this repo
# has been taken down (gh-pages branch deleted) and this job no longer deploys to it.
#
# Like ci.yaml, this runs the same script a developer runs locally
# (tools/ci/pre-commit/build_doc.sh, also the `build-doc` pre-commit hook) inside a Podman
# image built from containers/doc/Containerfile — no CI-only docs script, and the pinned
# mdbook toolchain is identical in both places. The image is tagged with the commit SHA
# for traceability but is not pushed: nothing else consumes it (CLAUDE.md, "Containers:
# Podman, not Docker").
#
# The docs build is a real gate: mdbook's linkcheck backend fails the job on a broken
# internal link, and book.toml sets `create-missing = false` so a SUMMARY.md entry
# pointing at a missing page fails too. External links are not followed — see the comment
# on `follow-web-links` in doc/book.toml.
#
# Build cache (#315): each run is a fresh runner, so podman's build cache is otherwise
# local-only and never survives between runs — this image (Rust toolchain + five `cargo
# install`s) was rebuilding from scratch every time. Mirrors ci.yaml's `build-workspace`
# job: log into ghcr.io, compute a stable `dc-doc-cache` ref, and pass it to
# build_doc.sh's `--cache-from`/`--cache-to`. `packages: write` only actually lands for
# same-repo events — GitHub forces GITHUB_TOKEN to read-only on `pull_request` from a
# fork regardless of what's requested here. That just means a fork PR pushes no cache and
# builds cold, same as before this change; it does not fail the build.
#
# PR preview (#135): the built site is uploaded as a workflow artifact on every run,
# including PRs — deliberately artifact-only rather than a hosted deploy, since this repo
# has no preview host configured (#184 closed without one) and reaching one from a fork PR
# would need `pull_request_target` plus a deploy token, i.e. secrets exposed to untrusted
# PR code. `pull_request` (not `pull_request_target`) keeps this safe for fork PRs — the
# default `GITHUB_TOKEN` is read-only there, which is all an artifact upload needs. The
# job summary step below turns that artifact into a one-click link from the PR's Checks
# tab instead of leaving reviewers to dig through the run's Artifacts section.
name: Documentation
on:
workflow_dispatch:
push:
branches:
- jazzy
paths:
- doc/**
- requirements/**
- containers/doc/Containerfile
- tools/ci/pre-commit/build_doc.sh
- .github/workflows/doc.yaml
pull_request:
branches:
- jazzy
paths:
- doc/**
- requirements/**
- containers/doc/Containerfile
- tools/ci/pre-commit/build_doc.sh
- .github/workflows/doc.yaml
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Verify podman
run: podman --version
- name: Log in to ghcr.io
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u "${{ github.actor }}" --password-stdin
# ghcr image names must be lowercase and GitHub expressions have no lowercase
# function, so the ref is computed here rather than inline (same as ci.yaml).
- name: Compute the cache ref
id: refs
env:
REPO: ${{ github.repository }}
run: |
IMAGE="ghcr.io/$(printf '%s' "$REPO" | tr '[:upper:]' '[:lower:]')"
echo "cache_ref=$IMAGE/dc-doc-cache" >> "$GITHUB_OUTPUT"
- name: Build the documentation
env:
IMAGE_TAG: dc-doc:${{ github.sha }}
CACHE_REF: ${{ steps.refs.outputs.cache_ref }}
run: ./tools/ci/pre-commit/build_doc.sh
- name: Upload the built site
id: upload-doc-site
uses: actions/upload-artifact@v4
with:
name: doc-site
path: doc/book/html
- name: Link the preview from the job summary
if: github.event_name == 'pull_request'
env:
ARTIFACT_URL: ${{ steps.upload-doc-site.outputs.artifact-url }}
run: |
{
echo "### 📖 Documentation preview"
echo
echo "[Download the built site](${ARTIFACT_URL}) (\`doc-site\`)."
echo
echo "This is a workflow artifact, not a hosted deploy — unzip it and open"
echo "\`index.html\`. Downloading requires a GitHub login with read access to"
echo "this repo, same as any other Actions artifact."
} >> "$GITHUB_STEP_SUMMARY"