-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (74 loc) · 2.35 KB
/
Copy pathdocs.yml
File metadata and controls
80 lines (74 loc) · 2.35 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
name: Docs
# The site at https://oliverd25.github.io/crypto-processing-api/.
#
# On a pull request: build with --strict, which fails on a broken internal
# link or a broken anchor. That is the whole reason the documentation could be
# reorganised into directories at all — nothing may 404 quietly.
#
# On main: build and publish.
# The two path lists are identical and are written out twice because GitHub
# Actions does not resolve YAML anchors in workflow files. If you change one,
# change the other.
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
# Transcluded into the site by pymdownx.snippets. A change to one of
# these can break the build, so it has to trigger the build.
- "CHANGELOG.md"
- "sdks/python/README.md"
- "sdks/typescript/README.md"
pull_request:
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
- "CHANGELOG.md"
- "sdks/python/README.md"
- "sdks/typescript/README.md"
workflow_dispatch:
# Never two deployments at once, and never cancel one that has started: a
# half-published site is worse than a late one.
concurrency:
group: pages
cancel-in-progress: false
permissions:
contents: read
jobs:
build:
name: mkdocs build --strict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
cache-dependency-path: docs/requirements.txt
# Only the documentation toolchain, exactly pinned. The service itself is
# deliberately not installed: nothing on the site is generated by
# importing it, so a site build cannot be broken by a runtime dependency.
- run: pip install -r docs/requirements.txt
- run: mkdocs build --strict
- name: Package the site for Pages
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
name: deploy to GitHub Pages
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5