-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (46 loc) · 1.42 KB
/
Copy pathdocs.yml
File metadata and controls
56 lines (46 loc) · 1.42 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: Deploy Documentation
on:
push:
branches:
- main
- master
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: |
uv sync --extra docs
- name: Setup Pages
uses: actions/configure-pages@v4
# No PYTHONPATH here on purpose. mkdocs.yml's mkdocstrings `paths: ["."]`
# (resolved relative to the config file, so it is the repo root regardless
# of cwd) is the single source of truth for the import root. This step used
# to set PYTHONPATH to the workspace, which was the only reason the build
# worked while `paths` pointed at the wrong directory — masking a config
# error that made `mkdocs build` fail for anyone running it locally.
- name: Build documentation
run: |
uv run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4