-
Notifications
You must be signed in to change notification settings - Fork 132
67 lines (56 loc) · 1.82 KB
/
site.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This is a basic workflow to compile and deploy notebook-classroom
name: Notebook-Classrom
# Only run on push to the master branch
on:
push:
branches: [ master ]
# Jobs to compile notebook classroom
jobs:
# Publish the application on github pages
publish:
# use ubuntu
runs-on: ubuntu-22.04
steps:
# Checks-out $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10
# install requirements
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
# Compile notebooks
- name: Compile Notebooks
run: |
mkdir nb
for i in sem*; do jupyter nbconvert --to html --output=$i --output-dir=nb $i/main.ipynb; done
for i in sem*; do jupyter nbconvert --to slides --output=$i --output-dir=nb $i/main.ipynb; done
# install latest notebook classroom app
- name: Install Notebook-classroom
run: |
wget https://github.com/hydrocode-de/notebook-classroom/releases/latest/download/notebook-classroom.zip
unzip notebook-classroom.zip -d dist
# install latest notebook classroom app
- name: Replace Files
run: |
cp -r docs/* dist/
cp -r nb dist/
# install latest notebook classroom app
- name: Add Index file
uses: docker://pandoc/core:2.9
with:
args: >- # allows you to break string into multiple lines
--standalone
--output=dist/static/readme.htlm
README.rst
- name: Deploy
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}