-
Notifications
You must be signed in to change notification settings - Fork 216
46 lines (39 loc) · 1.12 KB
/
pydoc.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
41
42
43
44
45
46
name: Python gh-pages doc
on:
pull_request:
release:
workflow_dispatch:
env:
CARGO_INCREMENTAL: false
jobs:
build_doc:
name: Build doc
runs-on: ubuntu-latest
if: github.repository == 'sonos/tract'
steps:
- uses: actions/checkout@v3
- name: Extract version tag
id: version
if: github.event_name == 'release' && github.event.action == 'published'
run: echo value=$(echo ${{ github.ref }} | cut -f 3 -d / | tr -d 'v' ) >> $GITHUB_OUTPUT
- name: Build doc
run: |
git config user.name "CI bot"
git config user.email [email protected]
git fetch origin gh-pages --depth=1
cd api/py
pip install -r requirements-docs.txt
version=${{steps.version.outputs.value}}
if [ -n "$version" ]
then
mike deploy $version
else
mike deploy 0.20.dev
fi
git fetch
git rebase --onto origin/gh-pages gh-pages
- name: Publish doc
continue-on-error: true
run: |
cd api/py
git push origin -f gh-pages:gh-pages