commit 145656d00c49cac3f9106294054ffd3d028a5109 Spenser Truex <truex@equwal.com> 2026-09-20 21:18:44 -0700 keep build.sh deploys off git/ and git.html build.sh and deploy-git.sh both publish into /var/www/recentlywritten, and build.sh's rsync --delete removed the freshly published git mirror as stale. Exclude the two paths deploy-git.sh owns.
build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/build.sh b/build.sh index 77bcf28..2236f0f 100755 --- a/build.sh +++ b/build.sh @@ -213,7 +213,11 @@ echo "Built $(ls "$SITE_DIR"/*.html | wc -l | tr -d ' ') pages → $SITE_DIR/" echo " posts: $(wc -l < "$WORK/posts.tsv" | tr -d ' ') pages: $(wc -l < "$WORK/pages.tsv" | tr -d ' ') feed: $(grep -c '<item>' "$SITE_DIR/rss.xml") items" # ── deploy ─────────────────────────────────────────────────── +# git/ and git.html share this web root but are published by deploy-git.sh, +# not built here. Excluding them keeps --delete from treating them as stale: +# rsync never deletes an excluded path on the receiving side. if [ "$DEPLOY" = yes ]; then - rsync -avzP --delete "$SITE_DIR/" "$DEPLOY_HOST:$DEPLOY_PATH" + rsync -avzP --delete --exclude=/git/ --exclude=/git.html \ + "$SITE_DIR/" "$DEPLOY_HOST:$DEPLOY_PATH" ssh "$DEPLOY_HOST" "chmod -R a+rX $DEPLOY_PATH" fi