generated from lucydot/ChooChoo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.52 KB
/
choochoo-tutorials.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
52
53
54
name: Publish tutorials
on:
push:
paths:
- 'tutorials/*'
branches:
- 'main'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.11'
architecture: 'x64'
- name: read yaml settings gh-pages
id: read-yaml-gh-pages
uses: KJ002/read-yaml@main
with:
file: './instructor/settings.yml'
key-path: '["gh-pages"]'
- name: Install library and other requirements
if: |
steps.read-yaml-gh-pages.outputs.data == 'true' ||
steps.read-yaml-gh-pages.outputs.data == 'True'
run: |
pip install jupyter nbconvert
- name: Convert notebook
if: |
steps.read-yaml-gh-pages.outputs.data == 'true' ||
steps.read-yaml-gh-pages.outputs.data == 'True'
run: |
jupyter nbconvert --to html ./tutorials/*.ipynb
rm ./tutorials/*.ipynb
- name: Deploy 🚀
if: |
steps.read-yaml-gh-pages.outputs.data == 'true' ||
steps.read-yaml-gh-pages.outputs.data == 'True'
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
branch: gh-pages # The branch the action should deploy to.
folder: tutorials # The folder the action should deploy.
target-folder: tutorials
commit-message: build tutorials
clean: false
git-config-name: choochoo-bot
git-config-email: <>