-
Notifications
You must be signed in to change notification settings - Fork 134
87 lines (69 loc) · 2.37 KB
/
documentation.yml
File metadata and controls
87 lines (69 loc) · 2.37 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Documentation CI/CD
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- major-release
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
# If it's a push (main or major-release) or workflow_dispatch, get full history.
fetch-depth: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && 0 || 1 }}
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: '3.13'
cache: pip
- uses: install-pinned/uv@20019e26f914870e2b2ad5f968e0bab666853050
- run: |
uv pip install --system -e .[all]
uv pip install --system -r requirements-dev.txt
- name: configure git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: docs/html
key: >-
sphinx
-${{ hashFiles('pyproject.toml') }}
-${{ hashFiles('setup.py') }}
-${{ hashFiles('requirements-dev.txt') }}
-${{ hashFiles('docs/make.py') }}
-${{ hashFiles('docs/conf.py') }}
- run: make build_docs
working-directory: docs
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
with:
path: docs/html/
deploy:
needs: build
# Only run this job if triggered by updating the main branch
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9
with:
disable-sudo: true
egress-policy: audit
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e