Commit cf773b8b9f
Verified · cmc
Layout: unified · split
.github/workflows/run-notebooks.yml deleted −42
| @@ -1,42 +0,0 @@ | ||
| 1 | name: Execute Notebooks | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | branches: [ main ] | |
| 6 | pull_request: | |
| 7 | branches: [ main ] | |
| 8 | workflow_dispatch: | |
| 9 | ||
| 10 | permissions: | |
| 11 | contents: read | |
| 12 | ||
| 13 | jobs: | |
| 14 | run-notebooks: | |
| 15 | runs-on: ubuntu-latest | |
| 16 | steps: | |
| 17 | - uses: actions/checkout@v4 | |
| 18 | ||
| 19 | - name: Set up Python | |
| 20 | uses: actions/setup-python@v4 | |
| 21 | with: | |
| 22 | python-version: '3.10' | |
| 23 | ||
| 24 | - name: Install dependencies | |
| 25 | run: | | |
| 26 | python -m pip install --upgrade pip | |
| 27 | pip install -r requirements.txt | |
| 28 | ||
| 29 | - name: Execute notebooks | |
| 30 | run: | | |
| 31 | mkdir -p executed | |
| 32 | for nb in $(git ls-files '*.ipynb'); do | |
| 33 | echo "Executing $nb" | |
| 34 | jupyter nbconvert --to notebook --inplace --execute "$nb" --ExecutePreprocessor.timeout=600 | |
| 35 | jupyter nbconvert --to html "$nb" --output-dir executed --output "$(basename "$nb" .ipynb)" | |
| 36 | done | |
| 37 | ||
| 38 | - name: Upload executed notebooks (HTML) | |
| 39 | uses: actions/upload-artifact@v4 | |
| 40 | with: | |
| 41 | name: executed-notebooks | |
| 42 | path: executed/ | |