-
Notifications
You must be signed in to change notification settings - Fork 282
53 lines (50 loc) · 1.42 KB
/
build_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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build and Update Docs
on:
push:
branches: [ master ]
pull_request:
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: test
- name: Install dependencies
shell: bash -l {0}
run: |
set -eux
conda activate test
pip install -r requirements.txt
pip install -r dev-requirements.txt
conda install pytorch cpuonly -c pytorch-nightly
python setup.py sdist bdist_wheel
pip install dist/*.whl
- name: Build docs
shell: bash -l {0}
run: |
set -eux
conda activate test
cd docs
pip install -r requirements.txt
make html
touch build/html/.nojekyll
cd ..
publish_docs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Deploy docs to Github pages
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
target-folder: master