Skip to content

Commit a07ab22

Browse files
committed
Adjust mkdocs CI to cover tag releases
1 parent 5099a24 commit a07ab22

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/mkdocs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
push:
66
branches:
77
- main
8+
tags:
9+
- "v*"
810
pull_request:
911
types: # Add closed type
1012
- opened
@@ -67,10 +69,14 @@ jobs:
6769
umbrella-dir: pr-preview
6870
token: ${{ github.token }}
6971

70-
- name: Build the documentation (mike)
71-
if: ${{ github.event_name == 'push' }}
72+
- name: Build the documentation (mike / latest)
73+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7274
run: mike deploy latest
7375

76+
- name: Build the documentation (mike / release tag)
77+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
78+
run: mike deploy --update-aliases "$(git describe)" release
79+
7480
- name: Deploy docs - latest
7581
if: ${{ github.event_name == 'push' }}
7682
run: git push origin gh-pages

0 commit comments

Comments
 (0)