-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 2.11 KB
/
Copy pathdocs.yml
File metadata and controls
72 lines (63 loc) · 2.11 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
name: Documentation
# docs/site/docs/changelog.md is a symlink to the root CHANGELOG.md. Its own blob is
# just the constant link target, so regenerating the changelog changes no path under
# docs/site/** and would never rebuild the site. The root file has to be listed too.
on:
push:
branches: [main]
paths:
- "docs/site/**"
- "CHANGELOG.md"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "docs/site/**"
- "CHANGELOG.md"
# For rebuilding the site by hand. The release changelog commit doesn't need it:
# it is pushed with the release App's token, so it triggers the push run above.
workflow_dispatch:
permissions:
contents: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Install dependencies
run: pip install --require-hashes -r docs/site/requirements.txt
- name: Build documentation
run: |
cd docs/site
mkdocs build --strict
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/site/site
deploy:
# Deploy on push and on manual/dispatched runs, never from a pull request, and
# only ever from main so a dispatch on a branch cannot publish that branch.
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1