Repository navigation
66 lines (59 loc) · 1.76 KB
/
Copy pathdocs.yml
File metadata and controls
66 lines (59 loc) · 1.76 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
66
# name: docs
# Builds the MkDocs site (catching broken links and missing nav pages via
# --strict) and deploys it to GitHub Pages.
#
# Automatic triggers are disabled while the repository is private (Actions
# minutes would be billed). Run manually via the Actions tab when needed;
# restore the push/pull_request triggers below when the repo goes public —
# and enable Pages once under Settings → Pages → Source: GitHub Actions.
#
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "README.md"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
permissions:
contents: read
jobs:
build:
name: Build site (strict)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Build site
# --strict turns broken internal links and missing nav pages into
# errors. Every page in docs/ is self-contained, so it can stay on.
run: uv run --only-group docs mkdocs build --strict --site-dir site
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v5