Skip to content

Commit 6feff50

Browse files
Create publish_docs.yml
1 parent 55791df commit 6feff50

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/publish_docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish HTML documentation
2+
3+
# Only run this when the develop branch changes
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
9+
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
10+
jobs:
11+
deploy-book:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
# Install dependencies
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.9
21+
22+
- name: Configure poetry environment
23+
shell: bash
24+
run: |
25+
python -m pip install poetry
26+
echo The Poetry version installed is `poetry --version`
27+
python -m poetry config virtualenvs.in-project true
28+
- name: Check for valid pyproject.toml
29+
shell: bash
30+
run: poetry check
31+
32+
- name: Install dependencies
33+
shell: bash
34+
run: python -m poetry install
35+
36+
# Build the book
37+
- name: Build the book
38+
run: |
39+
python -m poetry run jupyter-book build .
40+
41+
# Push the book's HTML to github-pages
42+
- name: GitHub Pages action
43+
uses: peaceiris/actions-gh-pages@v3.6.1
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: ./_build/html

0 commit comments

Comments
 (0)