docs version management improvements
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
af25e2507e
commit
42887a8189
2 changed files with 12 additions and 6 deletions
16
.github/workflows/docs.yml
vendored
16
.github/workflows/docs.yml
vendored
|
|
@ -34,17 +34,21 @@ jobs:
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
- name: Deploy dev docs (push to main)
|
- name: Deploy docs (push to main)
|
||||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
run: |
|
run: |
|
||||||
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout)
|
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout)
|
||||||
mike deploy --push --update-aliases "${PROJECT_VERSION}" dev
|
if [[ "${PROJECT_VERSION}" == *-SNAPSHOT ]]; then
|
||||||
# mike deploy --push --update-aliases dev
|
ALIAS="dev"
|
||||||
# mike set-default dev --push
|
else
|
||||||
|
ALIAS="prod"
|
||||||
|
fi
|
||||||
|
mike deploy --push --update-aliases "${PROJECT_VERSION}" "${ALIAS}"
|
||||||
|
mike set-default "${ALIAS}" --push
|
||||||
|
|
||||||
- name: Deploy versioned docs (release)
|
- name: Deploy versioned docs (release)
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITHUB_REF_NAME}
|
VERSION=${GITHUB_REF_NAME}
|
||||||
mike deploy --push --update-aliases "${VERSION}" latest
|
mike deploy --push --update-aliases "${VERSION}" release
|
||||||
mike set-default latest --push
|
mike set-default release --push
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@ extra:
|
||||||
default:
|
default:
|
||||||
- dev
|
- dev
|
||||||
- latest
|
- latest
|
||||||
|
- prod
|
||||||
|
- release
|
||||||
social:
|
social:
|
||||||
- icon: fontawesome/brands/github
|
- icon: fontawesome/brands/github
|
||||||
link: https://github.com/modelcontextprotocol/java-sdk
|
link: https://github.com/modelcontextprotocol/java-sdk
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue