-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (63 loc) · 2.08 KB
/
sphinx.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
66
67
68
69
70
71
72
73
name: Sphinx docs to gh-pages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2.4.0
- name: Cache conda
uses: actions/cache@v2.1.6
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('etc/example-environment.yml') }}
- name: Cache pip
uses: actions/cache@v2.1.6
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.1.1
with:
activate-environment: sisppeo
environment-file: conda/environment.yml
python-version: 3.8
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Verify Conda
run: |
conda info -e
conda list
- name: Install SISPPEO
run: python -m pip install .
- name: Test SISPPEO
run: sisppeo --help
- name: Setup Sphinx and build docs
run: |
pip install sphinx pydata-sphinx-theme sphinx-copybutton sphinx-panels
cd docs
pwd
make html
mv build/html/ ../public
cd ..
pwd
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true