2021-03-05 08:02:00 +01:00
|
|
|
name: docs
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-03-07 17:25:04 +01:00
|
|
|
- main
|
2023-03-07 17:36:48 +01:00
|
|
|
tags:
|
|
|
|
- v*
|
2021-03-05 08:02:00 +01:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-11-08 05:23:27 +01:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-07 17:36:48 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-11-04 08:48:59 +01:00
|
|
|
- uses: actions/setup-python@v4
|
2021-03-05 08:02:00 +01:00
|
|
|
with:
|
|
|
|
python-version: 3.x
|
2023-03-07 17:36:48 +01:00
|
|
|
|
|
|
|
- name: install tools
|
2023-03-07 17:37:57 +01:00
|
|
|
run: pip install mkdocs-material mike
|
2023-03-07 17:36:48 +01:00
|
|
|
|
|
|
|
- name: Setup doc deploy
|
|
|
|
run: |
|
|
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --local user.name "github-actions[bot]"
|
|
|
|
|
|
|
|
- name: Deploy version for tag/branch
|
|
|
|
run: mike deploy --push --update-aliases ${GITHUB_REF_NAME}
|
|
|
|
- name: Deploy latest version for tag only
|
|
|
|
if: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
run: mike deploy --push --update-aliases latest
|
|
|
|
- run: mike set-default --push latest
|