forked from carissalow/rapids
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.22 KB
/
docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: docs
on:
push:
branches:
- develop
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- if: ${{ github.ref == 'refs/heads/develop' }} #we delay develop because when we release a hotgix (tag + develop push), one of these push will be out of sync
uses: jakejarvis/wait-action@master
with:
time: '60s'
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install git+https://${GH_TOKEN}@github.com/carissalow/mkdocs-material-insiders.git
- run: pip install mike
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
git config user.name github-actions
git config user.email [email protected]
- 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
- 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
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}