rdy for deploy
This commit is contained in:
@@ -4,8 +4,9 @@ HOST="${1:-}"
|
||||
DEST="${2:-}"
|
||||
TMP="/tmp/masha_site_$(date +%s)"
|
||||
mkdir -p "$TMP"
|
||||
cp -a index.html "$TMP/"
|
||||
cp -a index.html "$TMP/index.html"
|
||||
ssh -o StrictHostKeyChecking=no "$HOST" "mkdir -p '$DEST'"
|
||||
rsync -az --delete "$TMP/"/ "$HOST":"$DEST"/
|
||||
scp -q "$TMP/index.html" "$HOST":"$DEST/.index.html.new"
|
||||
ssh -o StrictHostKeyChecking=no "$HOST" "mv '$DEST/.index.html.new' '$DEST/index.html'"
|
||||
rm -rf "$TMP"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user