commit 59b86ca8f6c62033e0384800ad73089edc9ba92d parent c29719625df8b4463ee4eaaefb3bd3da3dfc1bfd Author: Gabriel G. de Brito <me@gboncoffee.dev.br> Date: Tue, 17 Nov 2026 22:26:42 -0300 Properly remove stuff. Diffstat:
13 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/build.el b/build.el @@ -2,6 +2,11 @@ (require 'ox-publish) (require 'cl-lib) +;; Always build from scratch, so files whose source was removed don't linger in +;; public/ (and, through deploy.sh's rsync --delete, on the server). +(when (file-directory-p "public") + (delete-directory "public" t)) + (cl-labels ((read-file-to-string (file) (with-temp-buffer diff --git a/deploy.sh b/deploy.sh @@ -1,3 +1,16 @@ #!/bin/env bash +set -euo pipefail + +cd "$(dirname "$0")" + +# Clean build, so public/ mirrors exactly the current sources. Together with +# rsync --delete, this also removes deleted pages from the server. +emacs --batch -Q -l build.el + +# Never sync an empty or broken build: --delete would wipe the server. +if [[ ! -f public/index.html ]]; then + echo "public/index.html missing, aborting deploy" >&2 + exit 1 +fi rsync -avz --delete --chmod=D755,F644 public/ webmaster@latte:/var/www/site diff --git a/static/posts/politik/berlin-wall-kiss.jpg b/static/posts/politik/berlin-wall-kiss.jpg Binary files differ. diff --git a/static/posts/politik/eichmann.jpg b/static/posts/politik/eichmann.jpg Binary files differ. diff --git a/static/posts/politik/gaddafi.png b/static/posts/politik/gaddafi.png Binary files differ. diff --git a/static/posts/politik/hussein.jpeg b/static/posts/politik/hussein.jpeg Binary files differ. diff --git a/static/posts/politik/mengele.jpeg b/static/posts/politik/mengele.jpeg Binary files differ. diff --git a/static/posts/politik/mussolini.jpeg b/static/posts/politik/mussolini.jpeg Binary files differ. diff --git a/static/posts/politik/pellegrinis-hand.jpeg b/static/posts/politik/pellegrinis-hand.jpeg Binary files differ. diff --git a/static/posts/politik/pokrovsk.jpg b/static/posts/politik/pokrovsk.jpg Binary files differ. diff --git a/static/posts/politik/soviet-flag-is-lowered.jpg b/static/posts/politik/soviet-flag-is-lowered.jpg Binary files differ. diff --git a/static/posts/politik/syrian-blurs-womans.jpg b/static/posts/politik/syrian-blurs-womans.jpg Binary files differ. diff --git a/static/posts/politik/trump-at-notre-dame.png b/static/posts/politik/trump-at-notre-dame.png Binary files differ.