-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (43 loc) · 1.18 KB
/
publish.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
# Publish the documentation on merge and nightly
name: Publish the book
on:
push:
branches: [main]
schedule:
# every day at 4:00 -- ready for my morning coffee
# cheks compatibility with blackjax-nightly
- cron: '0 4 * * *'
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@v3
- name: Jupyter Book cache
id: cache
uses: actions/cache@v3
with:
path: ./jupyter_cache
key: jupyter-cache-${{ github.run_id }}
restore-keys: |
jupyter-cache
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build the book
run: |
mkdir -p ./jupyter_cache
jupyter-book build -nv --keep-going book
- name: Publish to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ./book/_build/html
clean: true