Add safe deploy script preserving data directory

This commit is contained in:
Alexander Schmidt
2026-03-26 13:55:59 +01:00
parent d01b7d0d27
commit 8ae736bbad
2 changed files with 24 additions and 0 deletions

14
scripts/deploy.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
# Safe deploy: never delete server-side runtime data/ files.
HOST="root@REDACTED"
TARGET="/home/REDACTED/public_html"
rsync -avz --delete \
--exclude '.git' \
--exclude 'node_modules' \
--exclude 'data/' \
./ "$HOST:$TARGET"
echo "Deploy complete (data/ preserved)."