-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 1.94 KB
/
docs.yml
File metadata and controls
75 lines (66 loc) · 1.94 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
name: Docs
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'docs/requirements.txt'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'docs/requirements.txt'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
# Only one Pages deployment can run at a time. Cancelling a queued
# deployment in favour of a newer one is fine; cancelling one already
# in flight would orphan a partial deploy, so we let it finish.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build site
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.x'
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install MkDocs and theme
run: pip install -r docs/requirements.txt
- name: Strict build (fails on warnings)
run: mkdocs build --strict
# Upload the generated site so the deploy job (or anyone debugging
# a PR) can grab it. Uses the dedicated Pages artifact format.
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
name: Deploy to GitHub Pages
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
# `actions/deploy-pages` needs `pages: write` to publish and
# `id-token: write` for OIDC verification of the artifact.
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5