Skip to content

Commit 5e15a13

Browse files
committed
update docs workflow
1 parent 15b0567 commit 5e15a13

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/docs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ jobs:
3838
env:
3939
GH_USERNAME: ${{ github.actor }}
4040

41-
# - name: Pre-fetch the gh-pages branch
42-
# run: git fetch --depth=1
43-
4441
- name: Build docs with MkDocs
4542
run: mkdocs build
4643

@@ -49,8 +46,12 @@ jobs:
4946
if: startsWith(github.ref, 'refs/tags/')
5047
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
5148

49+
# Prefetch gh-pages for mike to get correct versions
50+
- name: Pre-fetch the gh-pages branch
51+
run: git fetch origin gh-pages --depth=1
52+
5253
# This is for a tagged version
53-
- name: Create a new version ${{ steps.get_tag_name.outputs.TAG_NAME }} of documentation and push to GH pages.
54+
- name: Create a new version of documentation and push to GH pages.
5455
if: startsWith(github.ref, 'refs/tags/')
5556
run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push --update-aliases
5657

0 commit comments

Comments
 (0)