diff --git a/scripts/deploy.sh b/scripts/deploy.sh index c70f3bb..4aee3d5 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -78,7 +78,7 @@ COPYFILE_DISABLE=1 tar -C dist -czf - \ --exclude='.AppleDouble' \ . \ | ssh -o BatchMode=yes "$DEPLOY_HOST" \ - "mkdir -p '$DEPLOY_PATH' && rm -rf '$DEPLOY_PATH'/* && tar -C '$DEPLOY_PATH' -xzf -" + "mkdir -p '$DEPLOY_PATH' && find '$DEPLOY_PATH' -mindepth 1 -delete && tar -C '$DEPLOY_PATH' -xzf -" echo "==> 校验远端文件" ssh -o BatchMode=yes "$DEPLOY_HOST" \