File tree Expand file tree Collapse file tree 3 files changed +43
-86
lines changed Expand file tree Collapse file tree 3 files changed +43
-86
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3030 run : bash .github/scripts/fix-timestamps
3131 - name : Quarto Render
3232 uses : quarto-dev/quarto-actions/render@v2
33+ - name : Checkout notebooks branch
34+ uses : actions/checkout@v4
3335 with :
34- to : html
36+ ref : notebooks
37+ path : _output/branch-out
38+ fetch-depth : 0
39+ - name : Remove stale notebooks
40+ run : |
41+ pushd _output/branch-out
42+ git ls-files "*.ipynb" | while read ipynb; do
43+ src="../${ipynb%.ipynb}.qmd"
44+ if [ ! -f "$src" ]; then
45+ git rm --ignore-unmatch "$ipynb"
46+ fi
47+ done
48+ popd
49+ - name : Copy artifacts
50+ run : |
51+ # helper files at root
52+ cp Project.toml apt.txt postBuild _output/branch-out/
53+ cp -r .jupyter _output/branch-out/
54+
55+ pushd _output
56+
57+ rsync -avc --exclude='branch-out/' --include='*/' --include='*.ipynb' --exclude='*' --prune-empty-dirs ./ branch-out/
58+
59+ popd
60+ - name : Commit & Push to notebooks branch
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63+ run : |
64+ pushd _output/branch-out
65+ git config user.name "github-actions"
66+ git config user.email "[email protected] " 67+ git add .
68+ if git diff --cached --quiet; then
69+ echo "✅ No changes to push"
70+ else
71+ git commit -m "Update notebooks from ${{ github.sha }}"
72+ git push origin notebooks
73+ fi
74+ popd
3575 - name : Deploy page
3676 uses : JamesIves/github-pages-deploy-action@v4
3777 with :
Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ format:
6565 fig-responsive : true
6666 fig-width : 8.5
6767 fig-height : 4
68+ ipynb : default
6869
6970execute :
7071 eval : true
71- cache : false
72+ cache : true
7273 freeze : false
You can’t perform that action at this time.
0 commit comments