From 9b929627b92ccbb26d2e0c9ac51f06a32024e439 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 9 Mar 2024 13:40:07 -0700 Subject: [PATCH] rsync --- .drone.yml | 2 +- deploy.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4cb1c6b..635db69 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,7 @@ steps: image: alpine commands: - sh compile.sh - - apk add openssh + - apk add rsync openssh - sh deploy.sh environment: SSH_CONNECTION_STRING: diff --git a/deploy.sh b/deploy.sh index 1799e5c..019e23d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,7 +3,9 @@ set -e echo $SSH_KEY | base64 -d >> /tmp/key -chmod -R 0600 /tmp/key -scp -o StrictHostKeyChecking=no -i /tmp/key -r dist/* $SSH_CONNECTION_STRING:~ +chmod -R 0600 /tmp/key +rsync -e "ssh -i /tmp/key -o StrictHostKeyChecking=no" -avz dist/* $SSH_CONNECTION_STRING:~ + +echo "finished copying to remote host..." rm /tmp/key