1
- name : Deploy MkDocs
2
-
1
+ name : Documentation Build and Deploy
3
2
on :
4
3
push :
5
4
branches :
@@ -20,64 +19,50 @@ jobs:
20
19
uses : actions/checkout@v4
21
20
with :
22
21
fetch-depth : 0
23
- token : ${{ secrets.GITHUB_TOKEN }}
24
-
25
- # Set up Python and cache dependencies
26
- - name : Set up Python
22
+
23
+ - name : Setup Python
27
24
uses : actions/setup-python@v4
28
25
with :
29
26
python-version : 3.x
30
27
cache : pip
31
28
cache-dependency-path : docs/requirements.txt
32
29
33
- # Install Python dependencies
34
- - name : Install Python dependencies
30
+ - name : Install dependencies
35
31
run : |
36
32
python -m pip install --upgrade pip
33
+ pip install mkdocs-material
37
34
pip install -r docs/requirements.txt
38
35
39
- # Set up Node.js and cache dependencies
40
36
- name : Set up Node.js
41
37
uses : actions/setup-node@v3
42
38
with :
43
39
node-version : 18
44
40
cache : ' npm'
45
41
cache-dependency-path : docs/package-lock.json
46
42
47
- # Install Node.js dependencies
48
43
- name : Install Node.js dependencies
49
44
working-directory : ./docs
50
45
run : npm ci || npm install
51
46
52
- # Lint Markdown files (but don't fail the build)
53
47
- name : Lint Markdown files
54
48
working-directory : ./docs
55
49
run : npm run lint || echo "Lint check skipped, continuing deployment"
50
+ continue-on-error : true
56
51
57
- # Check for broken links or references (but don't fail the build)
58
- - name : Check for broken links
52
+ - name : Configure Git
59
53
run : |
60
- cd docs
61
- npm run links || echo "Link check found issues, review logs for details"
62
- continue-on-error : true
54
+ git config --global user.name "${{ github.actor }}"
55
+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
63
56
64
- # Build documentation
65
- - name : Build documentation
66
- run : mkdocs build --strict
57
+ - name : Ensure .nojekyll file exists
58
+ run : |
59
+ touch docs/.nojekyll
60
+ touch .nojekyll
61
+
62
+ - name : Deploy documentation
63
+ run : |
64
+ mkdocs gh-deploy --force --clean --verbose
67
65
68
- # Deploy to GitHub Pages
69
- - name : Deploy to GitHub Pages
70
- uses : JamesIves/github-pages-deploy-action@v4
71
- with :
72
- folder : site
73
- branch : gh-pages
74
- clean : true
75
- clean-exclude : |
76
- .nojekyll
77
- CNAME
78
- force : true
79
-
80
- # Verify deployment
81
66
- name : Verify deployment
82
67
run : |
83
68
echo "Documentation deployed to GitHub Pages"
0 commit comments