publish.yml deploys with peaceiris/actions-gh-pages@v4 and keep_files: true, so that a push to main does not wipe the live pr-N preview folders. The side effect is that the deploy never removes anything from gh-pages: a file deleted from the source stays on the site.
This has already happened once. #11 deleted six dataset files from lectures/_static on 2026-09-01. Three deploys later they were still served, byte-identical to the deleted files, and #27 had to remove them from gh-pages by hand on 2026-09-29. About 194 figure PNGs that were orphaned the same way are still on the branch.
One structural fix is for the deploy job to check out gh-pages, run rsync -a --delete --exclude 'pr-*/' of the build output over it, and push. Deleted files then go, and the previews stay. Alternatively, keep keep_files and add a cleanup step that can tell a preview folder from a stale file.
This is not urgent, because nothing reads the orphans today. It will bite again the next time a lecture or an asset is deleted.
Found during the datasets-migration close-out (QuantEcon/workspace-lectures#40).
publish.ymldeploys withpeaceiris/actions-gh-pages@v4andkeep_files: true, so that a push tomaindoes not wipe the livepr-Npreview folders. The side effect is that the deploy never removes anything fromgh-pages: a file deleted from the source stays on the site.This has already happened once. #11 deleted six dataset files from
lectures/_staticon 2026-09-01. Three deploys later they were still served, byte-identical to the deleted files, and #27 had to remove them fromgh-pagesby hand on 2026-09-29. About 194 figure PNGs that were orphaned the same way are still on the branch.One structural fix is for the deploy job to check out
gh-pages, runrsync -a --delete --exclude 'pr-*/'of the build output over it, and push. Deleted files then go, and the previews stay. Alternatively, keepkeep_filesand add a cleanup step that can tell a preview folder from a stale file.This is not urgent, because nothing reads the orphans today. It will bite again the next time a lecture or an asset is deleted.
Found during the datasets-migration close-out (QuantEcon/workspace-lectures#40).