local setup

This commit is contained in:
nik
2025-09-29 22:07:33 +03:00
parent e3f49d2ddc
commit d693c9589f
40 changed files with 1217 additions and 0 deletions

8
deploy/deploy.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
HOST="${1:-}"
DEST="${2:-}"
BUILD_DIR="public"
TMP="$(ssh -o StrictHostKeyChecking=no "$HOST" "mktemp -d")"
tar -cz -C "$BUILD_DIR" . | ssh -o StrictHostKeyChecking=no "$HOST" "tar -xz -C '$TMP'"
ssh -o StrictHostKeyChecking=no "$HOST" "bash -lc 'shopt -s dotglob nullglob; mkdir -p \"$DEST\"; rm -rf \"$DEST\"/* \"$DEST\"/.[!.]* \"$DEST\"/..?*; mv \"$TMP\"/* \"$DEST\"/; rmdir \"$TMP\"'"