File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,27 @@ jobs:
3131 git config user.name github-actions
3232 git config user.email github-actions@github.com
3333
34+ - name : Fetch gh-pages branch
35+ run : |
36+ if git ls-remote --exit-code --heads origin gh-pages > /dev/null 2>&1; then
37+ git fetch origin gh-pages:gh-pages
38+ echo "Fetched existing gh-pages branch"
39+ else
40+ echo "gh-pages branch does not exist yet, mike will create it"
41+ fi
42+
3443 - name : Deploy docs (versioned)
3544 env :
3645 GH_TOKEN : ${{ secrets.GH_TOKEN }}
3746 run : |
3847 # Always use the latest git tag as version
3948 VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
4049 mike deploy --push --update-aliases "$VERSION" latest
50+
51+ # Re-fetch gh-pages after deploy to get the updated branch
52+ git fetch origin gh-pages:gh-pages --force
4153 mike set-default --push latest
54+
55+ # Verify
56+ echo "Mike versions:"
57+ mike list
You can’t perform that action at this time.
0 commit comments