Skip to content

Commit 36781e4

Browse files
committed
Update documentation and workflows
1 parent edd207d commit 36781e4

File tree

4 files changed

+71
-14
lines changed

4 files changed

+71
-14
lines changed

.github/workflows/build-dev.yml renamed to .github/workflows/dev-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
- develop
77
paths-ignore:
88
- "docs/**"
9-
workflow_dispatch:
9+
- "mkdocs.yml"
10+
- "README.md"
11+
- "LICENSE"
1012

1113
jobs:
1214
build:

.github/workflows/dev-docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
2+
name: Development Documentation
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
paths:
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Configure Git Credentials
21+
run: |
22+
git config user.name github-actions[bot]
23+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.x
27+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
28+
- uses: actions/cache@v4
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install mkdocs-material mike
35+
- run: mike deploy --push --update-aliases "${{ vars.NEXT_VERSION }}" dev

.github/workflows/docs.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
1-
name: Build and Deploy Documentation
1+
# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
2+
name: Documentation
23

34
on:
45
push:
5-
tags:
6-
- v**
7-
workflow_dispatch:
6+
branches:
7+
- main
8+
paths:
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
12+
permissions:
13+
contents: write
814

915
jobs:
10-
build:
11-
name: Documentation
16+
deploy:
1217
runs-on: ubuntu-latest
1318
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4.1.7
16-
17-
- name: Deploy MkDocs
18-
uses: mhausenblas/mkdocs-deploy-gh-pages@1.26
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
- uses: actions/checkout@v4
20+
- name: Configure Git Credentials
21+
run: |
22+
git config user.name github-actions[bot]
23+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.x
27+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
28+
- uses: actions/cache@v4
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install mkdocs-material mike
35+
- run: mike deploy --push --update-aliases "${{ vars.THIS_VERSION }}" latest

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ theme:
3333
icon: material/brightness-4
3434
name: Switch to system preference
3535

36+
extra:
37+
version:
38+
provider: mike
39+
alias: true
40+
3641
extra_css:
3742
- stylesheets/cp-button.css
3843
- stylesheets/fonts.css

0 commit comments

Comments
 (0)