Skip to content

Commit 802cc49

Browse files
authored
Refactor docs.yml for improved syntax and updates
Updated the GitHub Actions workflow for documentation deployment, including syntax improvements and version updates.
1 parent f53402b commit 802cc49

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/docs.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ name: Deploy Documentation
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [master]
76
paths:
8-
- 'docs/**'
9-
- 'mkdocs.yml'
10-
- '.github/workflows/docs.yml'
7+
- "docs/**"
8+
- "mkdocs.yml"
9+
- ".github/workflows/docs.yml"
1110
workflow_dispatch:
1211

1312
permissions:
@@ -25,29 +24,28 @@ jobs:
2524
steps:
2625
- name: Checkout
2726
uses: actions/checkout@v4
28-
with:
29-
fetch-depth: 0
27+
28+
# IMPORTANT: configure Pages early (fixes "Get Pages site failed / HttpError: Not Found")
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
3031

3132
- name: Setup Python
3233
uses: actions/setup-python@v5
3334
with:
34-
python-version: '3.x'
35+
python-version: "3.11"
3536

3637
- name: Install MkDocs and dependencies
3738
run: |
39+
python -m pip install --upgrade pip
3840
pip install mkdocs-material
39-
pip install mkdocs-material[imaging]
4041
4142
- name: Build documentation
4243
run: mkdocs build --strict
4344

44-
- name: Setup Pages
45-
uses: actions/configure-pages@v4
46-
4745
- name: Upload artifact
4846
uses: actions/upload-pages-artifact@v3
4947
with:
50-
path: 'site'
48+
path: site
5149

5250
deploy:
5351
environment:

0 commit comments

Comments
 (0)