-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (41 loc) · 1.2 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
51
# Used rhodyprog4ds repository as a template for setting up the publish file
name: deploy-book
on:
push:
branches:
- main
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install dependencies
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: find file list
run: |
pip install git+https://github.com/compsys-progtools/courseutils@main
cspt kwlcsv .
# Build book
- name: Build the book
run: |
jupyter-book build . --builder pdfhtml
mv _build/pdf/book.pdf _build/html/coursemanual.pdf
jupyter-book build .
# Build the syllabus only
- name: Build the syllaubs
run: |
cd syllabus/
jupyter-book build . --toc _toc_syllabus.yml --builder pdfhtml --all
mv _build/pdf/book.pdf ../_build/html/syllabus.pdf
# Push the book's html to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html