Skip to content

Commit c3924fb

Browse files
committed
Add GitHub Actions workflow for documentation
1 parent 37c23db commit c3924fb

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build & Publish Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "docs-pages"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.11"
30+
31+
- name: Install documentation dependencies
32+
run: |
33+
pip install \
34+
mkdocs \
35+
mkdocs-material \
36+
mkdocs-network-graph-plugin \
37+
mkdocs-minify-plugin \
38+
mkdocs-git-revision-date-localized-plugin \
39+
mkdocs-privacy
40+
41+
- name: Build MkDocs site
42+
run: |
43+
mkdocs build --strict
44+
45+
- name: Upload Pages artefact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: site
49+
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4
62+

0 commit comments

Comments
 (0)