-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (41 loc) · 2.27 KB
/
nb_refresh.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
name: Update Notebook
on:
pull_request:
branches:
[main]
schedule:
- cron: '15 2 5 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
notebook_update:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Update pip and install depends
run: |
python -VV
python -m pip install --upgrade pip
python -m pip install --no-deps .
pip install -r requirements.txt
pip install jupyter nbconvert nbformat
- name: Update analysis notebook
run: |
jupyter nbconvert --to notebook --execute demos/Harmonize_CapeCod_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_CapeCod_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_CapeCod_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_CapeCod_Simple
jupyter nbconvert --to notebook --execute demos/Harmonize_Pensacola_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Pensacola_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_Pensacola_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Pensacola_Simple
jupyter nbconvert --to notebook --execute demos/Harmonize_Tampa_Detailed.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Tampa_Detailed
jupyter nbconvert --to notebook --execute demos/Harmonize_Tampa_Simple.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../demos/Harmonize_Tampa_Simple
- name: commit updated notebook
uses: EndBug/add-and-commit@v9
with:
author_name: 'github-actions[bot]'
author_email: 'github-actions[bot]@users.noreply.github.com'
message: "Update Notebook"
add: '["demos/Harmonize_CapeCod_Detailed.ipynb", "demos/Harmonize_CapeCod_Simple.ipynb", "demos/Harmonize_Pensacola_Detailed.ipynb", "demos/Harmonize_Pensacola_Simple.ipynb", "demos/Harmonize_Tampa_Detailed.ipynb","demos/Harmonize_Tampa_Simple.ipynb"]'