-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 970 Bytes
/
gh-pages.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
name: Publish to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
python-version: 3.9
auto-activate-base: false
- name: Dependencies
shell: bash -l {0}
run: |
conda install pip
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
- name: Build
shell: bash -l {0}
run: |
jupyter-book build . --config docs/_config.yml --toc docs/_toc.yml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' && job.status == 'success'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
enable_jekyll: false