-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (45 loc) · 1.47 KB
/
gh-pages.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
name: Build gh-pages
on:
push:
branches:
- main
pull_request:
jobs:
build-deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install
run: |
python -m pip install --upgrade pip
pip install .
pip install jupyter nbconvert matplotlib seaborn
- name: Create synthetic F280 data as CSV
run: |
mkdir artifacts
cd examples/bash
./generate_synthetic_F280_dataset.sh ../../artifacts/synthetic_records.csv 1000
- name: Convert example notebook to HTML
run: |
cd examples/notebooks
jupyter nbconvert --execute --to html basic_with_command_line.ipynb --output ../../artifacts/basic_with_command_line.html
jupyter nbconvert --execute --to html scenario_plots.ipynb --output ../../artifacts/scenario_plots.html
- name: Deploy if main
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./artifacts
force_orphan: true
- name: Upload artifact if not main
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v2
with:
name: gh-pages-draft
path: ./artifacts
retention-days: 4