Skip to content

Commit 8bc8cc9

Browse files
committed
fix: push core docs release to gh-pages once
Run mike deploy and set-default locally, then push gh-pages once so GitHub Pages builds a single time per release tag. Signed-off-by: Frederic Pillon <frederic.pillon@st.com> Assisted-by: GitHub Copilot: Claude Haiku 5.5
1 parent abc28d0 commit 8bc8cc9

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎.github/workflows/publish-docs.yml‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,14 @@ jobs:
7373
exit 1
7474
fi
7575
latest=$(git tag --list | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
76+
if git ls-remote --exit-code --heads pages gh-pages >/dev/null; then
77+
git fetch pages gh-pages:gh-pages
78+
fi
7679
if [[ "$VERSION" == "$latest" ]]; then
77-
mike deploy --remote pages --branch gh-pages --update-aliases --push "$VERSION" latest
78-
mike set-default --remote pages --branch gh-pages --push latest
80+
mike deploy --branch gh-pages --update-aliases "$VERSION" latest
81+
mike set-default --branch gh-pages latest
7982
else
80-
mike deploy --remote pages --branch gh-pages --push "$VERSION"
83+
mike deploy --branch gh-pages "$VERSION"
8184
fi
85+
# One push so GitHub Pages builds the site once.
86+
git push pages gh-pages

0 commit comments

Comments
 (0)