Commit 9891497666

98914976667a3453f524e770b90ac5a36391f511

parent: edfcd259af

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-16 17:39 UTC

Deploy assets before HTML in pre-push hook

rsync uploads alphabetically, so index.html could go live before
main.css. A request in that window made Cloudflare cache the old CSS
under the new cachebust URL. Sync everything except *.html first, then
the full tree with --delete.

Layout: unified · split

.githooks/pre-push +3
@@ -23,6 +23,9 @@ echo "pre-push: building site with zola..."
2323zola build
2424
2525echo "pre-push: deploying to ${remote_host}:${remote_path}..."
26# Upload assets before HTML so a page never references a cachebust URL
27# whose file is still the old version; Cloudflare would cache it for a year.
28rsync -az --exclude '*.html' public/ "${remote_host}:${remote_path}/"
2629rsync -az --delete public/ "${remote_host}:${remote_path}/"
2730
2831echo "pre-push: deploy complete."