Repository navigation
65 lines (56 loc) · 1.8 KB
/
Copy pathdocs.yml
File metadata and controls
65 lines (56 loc) · 1.8 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
57
58
59
60
61
62
63
64
65
name: docs site
# Rebuilds on every push that touches the docs, and can still be run by hand. The workflow
# used to be manual-only on purpose: deploying Pages needs the repository's Pages source set
# to "GitHub Actions" first, and a workflow that fails until someone flips a setting teaches
# people to ignore red Xs on `main`. Pages was enabled during publication and this workflow
# has since run green from a dispatch, so the rebuild is now automatic.
on:
push:
branches: [main]
paths:
- "docs/**"
# The logo, favicon, app icon and social artwork live here, and the site
# is the only surface that renders them. Without this an asset-only change
# leaves the deployed site showing the previous mark until a document
# happens to change.
- "assets/**"
- "overrides/**"
- "mkdocs.yml"
- "tools/build_docs_site.py"
- "README.md"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v7
with:
python-version: "3.12"
# --strict: a broken internal link fails the build rather than shipping a 404.
- name: Install the docs toolchain
run: pip install mkdocs-material
- name: Build (strict)
run: python3 tools/build_docs_site.py
- uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
name: deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4