Merge pull request #99 from ssciwr/pre-commit-ci-update-config #216
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: 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@v3 | |
- 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 | |
python -m jupyter nbconvert $filename --to slides --execute --ExecutePreprocessor.kernel_name=python | |
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 |