Skip to content

Commit

Permalink
dont deploy dev versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Oct 1, 2024
1 parent e0fe6a7 commit 01c448a
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,14 @@ jobs:
if [ "${{ steps.current.outputs.result }}" = "${{ steps.latest.outputs.result }}" ]
then
# Here we deploy a new latest version
mike deploy latest ${{ steps.current.outputs.result }} --config-file docs/mkdocs.yml --update-aliases --alias-type=redirect --push --remote doc
mike deploy latest --config-file docs/mkdocs.yml --update-aliases --alias-type=redirect --push --remote doc
mike retitle latest "${{ steps.current.outputs.result }} (latest)" --config-file docs/mkdocs.yml
else
# Here we deploy a version that's not the latest one
elif [ "$current_major" -lt "$latest_major" ] || \
{ [ "$current_major" -eq "$latest_major" ] && [ "$current_minor" -lt "$latest_minor" ]; }
then
# Here we deploy a version that's not the latest one and smaller as the latest version
mike deploy ${{ steps.current.outputs.result }} --config-file docs/mkdocs.yml --push --remote doc
# If the current semver version is bigger than the latest one, we rename the title to dev
if [ "$current_major" -gt "$latest_major" ] || \
{ [ "$current_major" -eq "$latest_major" ] && [ "$current_minor" -gt "$latest_minor" ]; }
then
mike retitle ${{ steps.current.outputs.result }} "${{ steps.current.outputs.result }} (dev)" --config-file docs/mkdocs.yml
fi
fi
- run: |
# Check if the "latest" alias exists
HAS_LATEST=$(mike list --config-file docs/mkdocs.yml --rebase --remote doc | grep latest) || true
Expand Down

0 comments on commit 01c448a

Please sign in to comment.