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:
parent
f35718b580
commit
b8429cb401
|
@ -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: |
|
||||
|
|
Loading…
Reference in New Issue