Skip to content

Merge pull request #105 from ssciwr/pre-commit-ci-update-config #230

Merge pull request #105 from ssciwr/pre-commit-ci-update-config

Merge pull request #105 from ssciwr/pre-commit-ci-update-config #230

Workflow file for this run

name: Publish
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Publish webpages and jupyter slides
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install -r requirements.txt
- run: |
for filename in $(ls lunchtime*/*.ipynb)
do
if [ "$filename" != "lunchtime1/lunchtime1.ipynb" ]; then
# if conversion takes more than 90s, kill it and try again
# workaround for ipywidgets conversion occasionally hanging
until timeout 90s python -m jupyter nbconvert $filename --to slides --execute --ExecutePreprocessor.kernel_name=python; do sleep 1; done
fi
done
- run: mv README.md lunchtime* dist/.
- uses: JamesIves/github-pages-deploy-action@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy to gh-pages
with:
branch: gh-pages
folder: dist
single-commit: true