-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.66 KB
/
build_docs.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
name: Publish Docs
on:
push:
branches:
- 'main'
env:
SM_FRAMEWORK: "tf.keras"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Publish Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.9
conda-channels: conda-forge
- name: Install and Build
shell: bash
run: |
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n docs python=3.10 scipy pyproj pandoc sphinx sphinx-autodoc-typehints jupyter_sphinx sphinx_rtd_theme sphinx-click nbsphinx myst-nb
source activate docs
python -m pip install -e .[doc]
sphinx-build -b html docs/ docs/_build/
#cd docs/
#make html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.event_name == 'release' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/_build/
#folder: docs/_build/html
clean: false
target-folder: ${{ github.ref }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.event_name == 'push' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/_build/
#folder: docs/_build/html
clean: false
target-folder: latest