-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.23 KB
/
build-book.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
name: Build and Publish JupyterBook Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docs/**"
pull_request:
branches:
- main
paths:
- "docs/**"
jobs:
docs-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r docs/requirements.txt
- name: Build JupyterBook
working-directory: ./docs
run: |
jupyter-book build .
- name: Check links with html proofer
uses: chabad360/htmlproofer@master
with:
directory: "./docs/_build/html"
arguments: --assume-extension --disable-external --only_4xx
continue-on-error: true
- name: Publish book
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html