docs: indicate stable version in selector on deploy (#654)

Adds an indicator in the form of `$version (stable)` to make it easier to see which is the most recent stable version.

This is done via CI and mike:

1. Set the previous title to just `$version`. We can get this value by `mike list stable` and grepping for valid version tags (otherwise this might have issues with `$version (stable)`).
2. Deploy `$new_version` and alias to stable.
3. Update the `$new_version` to have a new title of `$new_version (stable)`.
This commit is contained in:
Clement Tsang 2022-01-01 17:45:44 -08:00 committed by GitHub
parent f35718b580
commit b8429cb401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -47,10 +47,14 @@ jobs:
echo Name: $(git config --get user.name)
echo Email: $(git config --get user.email)
- name: Build and deploy docs with mike
- name: Build and deploy docs with mike as the latest stable branch
run: |
cd docs
OLD_STABLE_VERSION=$(mike list stable | grep -Po '([0-9]+.[0-9]+.[0-9]+)' | head -n1)
echo ${OLD_STABLE_VERSION}
mike retitle --push stable ${OLD_STABLE_VERSION}
mike deploy --push --update-aliases ${RELEASE_VERSION} stable
mike retitle --push ${RELEASE_VERSION} "${RELEASE_VERSION} (stable)"
# - name: Deploy to CF Pages
# run: |