forked from espnet/espnet
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.76 KB
/
publish_doc.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: publish doc
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
get_labels:
runs-on: ubuntu-latest
outputs:
is_doc: ${{ steps.check-labels.outputs.is_doc }}
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
- name: Check whether PR is related to documentation
id: check-labels
run: |
if [ -n "$GITHUB_PR_LABEL_DOCUMENTATION" ]; then
echo "is_doc=true" >> "$GITHUB_OUTPUT"
else
echo "is_doc=false" >> "$GITHUB_OUTPUT"
fi
generate_and_deplay_doc:
runs-on: ubuntu-latest
needs: get_labels
if: |
github.event_name != 'pull_request' ||
(github.event.pull_request.draft == false && needs.get_labels.outputs.is_doc == 'true')
steps:
- uses: actions/checkout@master
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/setup.py') }}
- uses: actions/setup-python@v1
with:
python-version: 3.8
architecture: "x64"
- name: check OS
run: cat /etc/os-release
- name: install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq -y cmake python3-dev git pandoc ffmpeg bc
- name: install espnet
env:
ESPNET_PYTHON_VERSION: 3.8
TH_VERSION: 2.0.1
CHAINER_VERSION: 6.0.0
USE_CONDA: false
run: ./ci/install.sh
- name: generate doc
run: ./ci/doc.sh
- name: deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/build