-
-
Notifications
You must be signed in to change notification settings - Fork 134
51 lines (43 loc) · 1.28 KB
/
build-html-and-deploy.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
name: Build HTML and Deploy to GH-PAGES
on:
push:
branches:
- main
jobs:
build-html-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.9.6'
# - name: Setup Miniconda
# uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# auto-activate-base: false
# miniconda-version: 'latest'
# python-version: 3.9.6
# environment-file: environment.yml
# activate-environment: bmcp
- name: Install jupyterbook requirements
shell: bash -l {0}
run: pip install -r requirements-docs.txt
- name: Build Website
shell: bash -l {0}
run: jb build .
# Add nojekyll to deployment so underscore
# https://stackoverflow.com/a/39691475/414104
- name: Add nojekyll
shell: bash -l {0}
run: touch _build/html/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _build/html
CLEAN: true