2020-11-30 19:57:01 +01:00
|
|
|
name: docs
|
2020-11-08 21:48:06 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-12-08 03:08:14 +01:00
|
|
|
- develop
|
|
|
|
tags:
|
|
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
2020-11-08 21:48:06 +01:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-09 20:12:35 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-11-08 21:48:06 +01:00
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- run: pip install git+https://${GH_TOKEN}@github.com/carissalow/mkdocs-material-insiders.git
|
2020-11-09 19:34:02 +01:00
|
|
|
- run: pip install mike
|
2020-11-09 19:38:40 +01:00
|
|
|
- run: |
|
2020-11-09 20:12:35 +01:00
|
|
|
git config user.name github-actions
|
|
|
|
git config user.email github-actions@github.com
|
2020-12-08 03:08:14 +01:00
|
|
|
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
- run: echo "DOCS_TAG=$(echo $RELEASE_VERSION | sed -n "s/v\([0-9]\+\.[0-9]\+\).*$/\1/p")" >> $GITHUB_ENV
|
2020-12-19 04:46:30 +01:00
|
|
|
- run: git pull --all
|
2020-12-08 03:08:14 +01:00
|
|
|
- if: startsWith(github.ref, 'refs/tags')
|
|
|
|
run: mike deploy --push --update-aliases $DOCS_TAG latest
|
|
|
|
- if: ${{ github.ref == 'refs/heads/develop' }}
|
|
|
|
run: mike deploy --push --update-aliases dev
|
|
|
|
|
2020-11-08 21:48:06 +01:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|