-
Notifications
You must be signed in to change notification settings - Fork 59
33 lines (33 loc) · 984 Bytes
/
docs.yml
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
name: Build and publish docs
on:
pull_request:
push:
branches: [develop]
release:
types: [released]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- run: pip3 install -r docs/requirements.txt
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "GitHub Action"
- if: github.event_name == 'pull_request'
run: mkdocs build
- if: github.event_name == 'push'
run: mike deploy --push develop
- if: github.event_name == 'release'
run: |
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
mike deploy --push --update-aliases $RELEASE_VERSION latest