-
Notifications
You must be signed in to change notification settings - Fork 40
42 lines (40 loc) · 1.39 KB
/
sphinx-ci.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
name: Sphinx build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt -y update
sudo apt install -y libgdal-dev gdal-bin python3-pip git python3-opencv
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip3 install --upgrade requests
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu \
opencv-python wandb numpy==1.23 sphinx
python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
pip install --upgrade Pygments
pip install .
pip install sphinx_rtd_theme nbsphinx
sphinx-apidoc -f -o ./docs/source/ detectree2/
sphinx-build -b html docs/source/ docs/build/html
# - name: Build HTML
# uses: ammaraskar/sphinx-action@0.4
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html