Skip to content

Commit a0d9471

Browse files
committed
feature: publishing versioned data via mike
1 parent d59516d commit a0d9471

File tree

4 files changed

+48
-26
lines changed

4 files changed

+48
-26
lines changed

.github/workflows/develop.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build/Publish Develop Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.10.6
18+
- name: Install Dependencies
19+
run: |
20+
pip install mkdocs-material
21+
pip install pillow cairosvg mike
22+
- name: Setup Docs Deploy
23+
run: |
24+
git config user.name github-actions[bot]
25+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
26+
- name: Build Docs Website
27+
run: mike deploy --push develop

.github/workflows/publish.yml

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,28 @@
1-
name: ci
2-
1+
name: Build/Publish Latest Release Docs
32

43
on:
5-
push:
6-
branches:
7-
- master
4+
release:
5+
types: [published]
86

97
permissions:
108
contents: write
11-
129
jobs:
1310
deploy:
1411
runs-on: ubuntu-latest
1512
steps:
16-
- uses: actions/checkout@v4
17-
- name: Configure Git Credentials
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.10.6
19+
- name: Install Dependencies
20+
run: |
21+
pip install mkdocs-material
22+
pip install pillow cairosvg mike
23+
- name: Setup Docs Deploy
1824
run: |
1925
git config user.name github-actions[bot]
2026
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21-
22-
- uses: actions/setup-python@v5
23-
with:
24-
python-version: 3.x
25-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
26-
27-
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
35-
36-
37-
- run: mkdocs gh-deploy --force
27+
- name: Build Docs Website
28+
run: mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ nav:
3030
- Mir's Built-in Configuration: configuration/mir.md
3131
- Display Configuration: configuration/display_configuration.md
3232
- Roadmap: roadmap.md
33+
extra:
34+
version:
35+
provider: mike

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
mkdocs
2-
mkdocs-material
2+
mkdocs-material
3+
mike

0 commit comments

Comments
 (0)