File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 runs-on : ubuntu-latest
1515
1616 steps :
17- - name : Build
18- run :
19- mkdocs build
20- - name : Deploy
21- run :
22- mkdocs gh-deploy
17+
18+ - name : Checkout repository
19+ uses : actions/checkout@v4
20+ with :
21+ # Ensure full history so mkdocs gh-deploy can create commits correctly
22+ fetch-depth : 0
23+
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : ' 3.13'
28+
29+ - name : Cache pip
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.cache/pip
33+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
34+ restore-keys : |
35+ ${{ runner.os }}-pip-
36+
37+ - name : Install MkDocs and plugins
38+ run : |
39+ if [ -f requirements.txt ]; then
40+ pip install -r requirements.txt
41+ else
42+ # Basic MkDocs + Material theme as a sensible default
43+ pip install mkdocs mkdocs-material
44+ fi
45+
46+ - name : Verify MkDocs config
47+ run : |
48+ if [ ! -f mkdocs.yml ]; then
49+ echo "mkdocs.yml not found at repo root."
50+ exit 1
51+ fi
52+ mkdocs --version
53+ mkdocs build --strict
54+
55+ - name : Build
56+ run :
57+ mkdocs build
58+ - name : Deploy
59+ run :
60+ mkdocs gh-deploy
You can’t perform that action at this time.
0 commit comments