@@ -29,15 +29,11 @@ jobs:
2929
3030 - name : Execute notebooks
3131 run : |
32- # Install common-lisp-jupyter in a container but execute on host
3332 docker run --rm \
3433 -v ${{ github.workspace }}:/workspace \
3534 -w /workspace \
3635 ghcr.io/lisp-stat/cl-jupyter:latest \
3736 bash -c "
38- # Install jupyter if not available
39- pip install jupyter nbconvert
40-
4137 # Execute all notebooks
4238 for notebook in *.ipynb; do
4339 if [ -f \"\$notebook\" ]; then
@@ -47,23 +43,19 @@ jobs:
4743 done
4844 "
4945
46+ - name : Install nbconvert
47+ run : pip install nbconvert
48+
5049 - name : Convert notebooks to HTML
5150 run : |
52- # Use a much simpler approach - just use the host directly
53- pip install jupyter nbconvert
54-
55- # Create output directory
51+ # Create output directory first
5652 mkdir -p _site
5753
58- # Convert each notebook individually to avoid output-dir issues
59- for notebook in *.ipynb; do
60- if [ -f "$notebook" ]; then
61- echo "Converting $notebook"
62- jupyter nbconvert --to html "$notebook"
63- # Move the generated HTML to _site
64- mv "${notebook%.ipynb}.html" _site/
65- fi
66- done
54+ # Convert notebooks using the proven working approach from the example
55+ find . -name '*.ipynb' -type f -execdir jupyter nbconvert --template classic --to html {} \;
56+
57+ # Move all HTML files to _site directory
58+ find . -name '*.html' -not -path './_site/*' -exec mv {} _site/ \;
6759
6860 # Create index.html
6961 echo '<h1>IPS9 - Introduction to the Practice of Statistics</h1>' > _site/index.html
0 commit comments