← back to Allnewsdaily
allnewsdaily: add self-verifying deploy-outlets.sh (rsync outlets.json + print remote count)
47a0b364dddbaf2548e30a7e7f89a3363c4378cd · 2026-09-09 23:39:32 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015acgmNP9spwqQLjfFcf1Qs
Files touched
A scripts/deploy-outlets.sh
Diff
commit 47a0b364dddbaf2548e30a7e7f89a3363c4378cd
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Sep 9 23:39:32 2026 -0700
allnewsdaily: add self-verifying deploy-outlets.sh (rsync outlets.json + print remote count)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015acgmNP9spwqQLjfFcf1Qs
---
scripts/deploy-outlets.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/scripts/deploy-outlets.sh b/scripts/deploy-outlets.sh
new file mode 100755
index 0000000..cd0bf48
--- /dev/null
+++ b/scripts/deploy-outlets.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+# One-shot: push data/outlets.json to prod and PRINT the resulting remote outlet count.
+# Reversible: git revert the outlets.json commit, then re-run this. No restart needed
+# (server reads outlets.json fresh per request).
+set -euo pipefail
+cd "$(dirname "$0")/.."
+PROD="${PROD_HOST:-root@45.61.58.125}"
+SSH_OPTS="-o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new"
+REMOTE="/root/Projects/allnewsdaily/data/outlets.json"
+
+echo "[deploy-outlets] local count: $(node -e "console.log(require('./data/outlets.json').length)")"
+rsync -az -e "ssh $SSH_OPTS" data/outlets.json "$PROD:$REMOTE"
+echo "[deploy-outlets] rsync ok"
+ssh $SSH_OPTS "$PROD" "node -e \"console.log('[deploy-outlets] REMOTE count now:', require('$REMOTE').length)\""
+echo "[deploy-outlets] done $(date -u +%FT%TZ)"
← 944b120 allnewsdaily Short: up to 4x/day (6/11/16/21) + guard follow
·
back to Allnewsdaily
·
allnewsdaily: PROXY_URL-aware + gzip + early-abort fetch in 046bf14 →