Repository navigation
65 lines (58 loc) · 1.75 KB
/
Copy pathdocs.yml
File metadata and controls
65 lines (58 loc) · 1.75 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
name: Docs
# Builds the documentation site and deploys it to GitHub Pages. Pages has to be
# switched on once in the repository settings (Settings, Pages, Source = GitHub
# Actions) before the first deploy can publish.
on:
push:
branches: [main]
paths:
- "docs/**"
- "docs-theme/**"
- "mkdocs.yml"
- "docs-requirements.txt"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- "docs-theme/**"
- "mkdocs.yml"
- "docs-requirements.txt"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build the site
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
with:
python-version: "3.x"
- run: pip install -r docs-requirements.txt
# --strict turns a broken internal link into a failed build.
- run: mkdocs build --strict
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: site
# GitHub Pages is not available for a private repository on this plan, so
# publishing waits for the repository to be public instead of failing.
deploy:
name: Deploy
needs: build
if: github.event_name != 'pull_request' && !github.event.repository.private
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5