add openpyxl to deps to read xlsx file, fixes to real data notebook t… #102
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 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install -r requirements.txt | |
- run: sudo apt update -qy && sudo apt install ffmpeg -qy | |
- run: jupyter nbconvert *.ipynb --to slides --execute | |
- run: | | |
for filename in $(ls *.ipynb) | |
do | |
jupyter nbconvert --execute --to slides $filename --post serve & | |
sleep 30 | |
base="$(basename $filename .ipynb)" | |
pdf="${base}.pdf" | |
webpage="http://127.0.0.1:8000/${base}.slides.html/?print-pdf" | |
echo "$webpage -> $pdf" | |
google-chrome --headless --print-to-pdf=$pdf $webpage | |
killall jupyter-nbconvert | |
sleep 10 | |
done | |
- run: mv *.slides.html *.pdf dist/. && mv dist/index.slides.html dist/index.html | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "dist/" | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/deploy-pages@v4 | |
id: deployment |