Skip to content

Commit

Permalink
Merge pull request #2810 from swcurran/docs-by-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
swcurran authored Feb 22, 2024
2 parents 4ae453d + 5b2c907 commit 8ca1ab3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ jobs:
# Copy all of the root level md files into the docs folder for deployment, tweaking the relative paths
for i in *.md; do sed -e "s#docs/#./#g" $i >docs/$i; done
# Populate overrides for the current version, and then remove to not apply if VERSION is main branch
echo -e "{% extends "base.html" %}\n\n{% block outdated %}\n You are viewing the documentation for ACA-Py Release $VERSION.\n{% endblock %}" >overrides/main.html
# If building from main, use latest as ALIAS and remove the base.html override
[ "$VERSION" == "main" ] && ALIAS=latest && rm overrides/base.html
OVERRIDE=overrides/main.html
echo -e "{% extends \"base.html\" %}\n\n{% block outdated %}\n You are viewing the documentation for ACA-Py Release $ALIAS.\n{% endblock %}" >$OVERRIDE
# If building from main, use latest as ALIAS and remove the override
[ "$VERSION" == "main" ] && ALIAS=latest && rm $OVERRIDE
echo $VERSION $ALIAS
mike deploy --push --update-aliases $VERSION $ALIAS
mike set-default latest

0 comments on commit 8ca1ab3

Please sign in to comment.