-
Notifications
You must be signed in to change notification settings - Fork 113
50 lines (42 loc) · 1.3 KB
/
pull_request.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
name: Pull Request Build
on:
pull_request:
types: [opened, synchronize, reopened, closed]
paths-ignore:
- ".devcontainer/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
if: github.event.action != 'closed'
uses: actions/checkout@v4
- name: Setup JupyterBook Cache
if: github.event.action != 'closed'
uses: actions/cache@v4
with:
path: _build
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
key: jupyterbook-20250221
- uses: prefix-dev/[email protected]
with:
manifest-path: pyproject.toml
cache: true
activate-environment: true
- name: Build JupyterBook
if: github.event.action != 'closed'
run: |
jupyter-book build ./ --warningiserror --keep-going
- name: Dump Build Logs
if: github.event.action != 'closed'
run: |
if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi
- name: Upload artifact
if: github.event.action != 'closed'
uses: actions/upload-artifact@v4
with:
name: html
path: _build/html