Skip to content

Commit

Permalink
Merge branch '3.4.x' into 3.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Oct 1, 2024
2 parents a7381da + e0fe6a7 commit ad672bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,28 @@ jobs:
- run: git remote add doc [email protected]:patchlevel/event-sourcing-docs.git
- run: git fetch doc gh-pages --verbose

- run: |
- run: |
current_major=$(echo "$version_current" | cut -d '.' -f 1)
current_minor=$(echo "$version_current" | cut -d '.' -f 2)
latest_major=$(echo "$version_latest" | cut -d '.' -f 1)
latest_minor=$(echo "$version_latest" | cut -d '.' -f 2)
if [ "${{ steps.current.outputs.result }}" = "${{ steps.latest.outputs.result }}" ]
then
# Here we deploy a new latest version
mike deploy ${{ steps.current.outputs.result }} latest --config-file docs/mkdocs.yml --update-aliases --push --remote doc
mike deploy latest ${{ steps.current.outputs.result }} --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
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: |
Expand Down
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extra:
link: https://patchlevel.de
version:
provider: mike
canonical_version: latest
analytics:
provider: custom

Expand Down

0 comments on commit ad672bc

Please sign in to comment.