Update Notebook #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]' |