-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1022 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
34
35
36
37
38
39
40
name: Docs
on:
release:
types: [ released ]
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
- run: git fetch origin gh-pages --depth=1
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install
run: |
pip install -e .
pip install -r docs/requirements.txt
# release
- id: get_version
if: github.event_name == 'release'
name: Get the release version
uses: Simply007/get-version-action@v2
- name: Deploy the docs
if: github.event_name == 'release'
run: |
PYTHONPATH=$PYTHONPATH:./docs mike deploy ${{ steps.get_version.outputs.version-without-v }} latest --push --update-aliases
# dev
- name: Deploy the docs
if: ${{ github.ref == 'refs/heads/dev' }}
run: |
PYTHONPATH=$PYTHONPATH:./docs mike deploy dev --push