File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Documentation
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' docs/**'
9+ - ' mkdocs.yml'
10+ - ' .github/workflows/deploy-docs.yml'
11+ workflow_dispatch : # Allow manual triggering
12+
13+ permissions :
14+ contents : write
15+ pages : write
16+ id-token : write
17+
18+ jobs :
19+ deploy :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0 # Fetch all history for git info
26+
27+ - name : Set up Python
28+ uses : actions/setup-python@v4
29+ with :
30+ python-version : ' 3.10'
31+
32+ - name : Cache dependencies
33+ uses : actions/cache@v3
34+ with :
35+ path : ~/.cache/pip
36+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
37+ restore-keys : |
38+ ${{ runner.os }}-pip-
39+
40+ - name : Install MkDocs and dependencies
41+ run : |
42+ pip install mkdocs-material
43+ pip install mkdocs-git-revision-date-localized-plugin
44+ pip install mkdocs-minify-plugin
45+ pip install mkdocs-redirects
46+
47+ - name : Build documentation
48+ run : mkdocs build --strict
49+
50+ - name : Deploy to GitHub Pages
51+ run : mkdocs gh-deploy --force
52+
You can’t perform that action at this time.
0 commit comments