rdy for deploy

This commit is contained in:
nik
2025-09-22 21:22:25 +03:00
parent 61c637f43c
commit 1b100fcc3c
4 changed files with 688 additions and 0 deletions

6
deploy/Caddyfile Normal file
View File

@@ -0,0 +1,6 @@
маша-дергачева.рф {
root * /srv/www/masha-site
encode zstd gzip
file_server
}

11
deploy/deploy.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
HOST="${1:-}"
DEST="${2:-}"
TMP="/tmp/masha_site_$(date +%s)"
mkdir -p "$TMP"
cp -a index.html "$TMP/"
ssh -o StrictHostKeyChecking=no "$HOST" "mkdir -p '$DEST'"
rsync -az --delete "$TMP/"/ "$HOST":"$DEST"/
rm -rf "$TMP"