Skip to content

Commit e6f45b2

Browse files
maxgallianigamova
authored andcommitted
ci(docs): automatically set new tags as latest and default version
1 parent b98675d commit e6f45b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ jobs:
3131
git config user.email [email protected]
3232
3333
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
34-
# Tag push: deploy the tag version
34+
# Tag push: deploy the tag version with 'latest' alias and set as default
3535
TAG_VERSION=${GITHUB_REF#refs/tags/}
3636
echo "Deploying docs for tag $TAG_VERSION"
37-
mike deploy --push $TAG_VERSION
37+
mike deploy --push --update-aliases $TAG_VERSION latest
38+
echo "Setting $TAG_VERSION as default version"
39+
mike set-default --push $TAG_VERSION
3840
else
3941
# Main branch push: deploy to 'main'
4042
echo "Deploying docs for main branch"

0 commit comments

Comments
 (0)