1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Docs Build Check
# Gate the documentation build on pull requests. The deploy workflow
# (docs.yml) only runs on push to main, so without this a PR that breaks the
# docs build (a malformed page, or a mkdocstrings reference to a removed
# symbol) would merge green and only fail afterward on the main deploy.
on:
pull_request:
branches:
paths:
- 'docs/**'
- 'mkdocs.yml'
# The Python API reference is generated from these by mkdocstrings, so a
# source change can break the build just as a docs change can.
- 'mrrc/**.py'
- 'mrrc/_mrrc.pyi'
- '.github/workflows/docs-check.yml'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: mkdocs build (strict)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6.0.3
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
- name: Install dependencies
# See CLAUDE.md "Documentation site" for why `--no-install-project`:
# mkdocstrings reads mrrc/__init__.py and _mrrc.pyi statically, so the
# compiled extension is not needed to build the docs.
run: uv sync --extra docs --no-install-project
- name: Build documentation
run: uv run mkdocs build --strict