Skip to content

Run all notebooks

Run all notebooks #46

Workflow file for this run

name: Run all notebooks
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install jupyter nbconvert
pip install pandas
- name: Run notebooks
run: |
jupyter nbconvert --to notebook --execute scripts/*.ipynb
- name: Add and move generated files
run: |
git add scripts/*.csv scripts/named-entities-for-premodern-chinese-history-research
git mv -f scripts/*.csv .
rm -rf scripts/cbdb_sqlite/
rm scripts/*.nbconvert.ipynb
rm scripts/latest.db
- name: Commit changes
uses: stefanzweifel/[email protected]
with:
github_token: ${{ secrets.MERAKTX_TOKEN_FOR_GIT_ACTION }}
file_pattern: '*.csv'
commit_message: 'Rerun notebooks and update generated files'
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MERAKTX_TOKEN_FOR_GIT_ACTION }}
branch: main