-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.7 KB
/
Copy pathdocs.yml
File metadata and controls
56 lines (45 loc) · 1.7 KB
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
50
51
52
53
54
55
56
name: Docs
on:
# The site is versioned with the tool. release-please publishes a release when
# its release PR is merged, and that is the only thing that republishes the
# docs — so the published site always describes the released version, never
# unreleased work sitting on main.
release:
types: [published]
# So the site can be republished without an intervening release.
workflow_dispatch:
# Never let two deploys race; the newest wins, and an in-flight one is not
# cancelled half-way through publishing.
concurrency:
group: docs
cancel-in-progress: false
jobs:
deploy:
name: build & deploy
runs-on: ubuntu-latest
permissions:
contents: write # mkdocs gh-deploy pushes to the gh-pages branch
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # gh-deploy needs the branch history
- name: "Set up Python"
uses: actions/setup-python@v7
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --group docs
# The reference pages and the JSON Schema are not committed — they are
# written here, so they cannot be out of date with the code they describe.
- name: Generate the reference
run: uv run python docs/gen_docs.py
# --strict turns a broken internal link or a page missing from the nav
# into a failure, so the site is checked before it is published.
- name: Build
run: uv run --group docs mkdocs build --strict
- name: Deploy
run: uv run --group docs mkdocs gh-deploy --force --no-history