File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,18 @@ jobs:
2121 run : |
2222 sudo apt-get update
2323 sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic
24- pip install jupyter nbconvert
24+ pip install jupyter==1.1.1 nbconvert==7.16.6
2525
2626 - name : Convert notebooks to PDF
2727 run : |
2828 mkdir -p pdfs
29- for notebook in *.ipynb; do
29+ shopt -s nullglob
30+ notebooks=(*.ipynb)
31+ if [ ${#notebooks[@]} -eq 0 ]; then
32+ echo "No notebooks found to convert"
33+ exit 0
34+ fi
35+ for notebook in "${notebooks[@]}"; do
3036 echo "Converting $notebook to PDF..."
3137 jupyter nbconvert --to pdf "$notebook" --output-dir=pdfs || echo "Warning: Failed to convert $notebook"
3238 done
3541 env :
3642 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3743 run : |
38- for pdf in pdfs/*.pdf; do
44+ shopt -s nullglob
45+ pdfs=(pdfs/*.pdf)
46+ if [ ${#pdfs[@]} -eq 0 ]; then
47+ echo "No PDFs found to upload"
48+ exit 0
49+ fi
50+ for pdf in "${pdfs[@]}"; do
3951 echo "Uploading $pdf to release..."
4052 gh release upload ${{ github.event.release.tag_name }} "$pdf" --clobber
4153 done
You can’t perform that action at this time.
0 commit comments