-
Notifications
You must be signed in to change notification settings - Fork 43
52 lines (44 loc) · 1.21 KB
/
build.yaml
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
on:
workflow_dispatch:
workflow_call:
pull_request:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
shell: bash -el {0}
jobs:
build-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
- run: pip install -r book/requirements.txt
- run: pip freeze
- name: cache executed notebooks
uses: actions/cache@v3
with:
path: _build/.jupyter_cache
key: jupyter-cache-${{ hashFiles('book/requirements.txt') }}
- name: Build the book
# TODO: add -W when we can be strict about builds
# for now, allow publishing with warnings
run: jupyter-book build . # -W
- uses: actions/upload-artifact@v3
# always upload artifact, which can include error messages
if: always()
with:
name: documentation
path: ./_build/html
retention-days: 2
if-no-files-found: error
- name: Show error reports
if: failure()
run: |
find _build/html/reports -type f -print -exec cat {} \;