diff --git a/deploy.sh b/deploy.sh index 3b4858c..d27238f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -110,7 +110,7 @@ fi cd "$REMOTE_DIR" # Restore .envs secrets -if [ -d /tmp/.envs-backup ]; then +if [ -d /tmp/.envs-backup ] && [ "$(ls -A /tmp/.envs-backup 2>/dev/null)" ]; then echo ">>> Restoring .envs secrets..." mkdir -p "$REMOTE_DIR/smoothschedule/.envs" cp -r /tmp/.envs-backup/* "$REMOTE_DIR/smoothschedule/.envs/" @@ -118,7 +118,7 @@ if [ -d /tmp/.envs-backup ]; then fi # Restore .ssh keys -if [ -d /tmp/.ssh-backup ]; then +if [ -d /tmp/.ssh-backup ] && [ "$(ls -A /tmp/.ssh-backup 2>/dev/null)" ]; then echo ">>> Restoring .ssh keys..." mkdir -p "$REMOTE_DIR/smoothschedule/.ssh" cp -r /tmp/.ssh-backup/* "$REMOTE_DIR/smoothschedule/.ssh/"