From 8e365f225595d0ae5c356d2c39b40effd4192370 Mon Sep 17 00:00:00 2001 From: WuYongJie Date: Thu, 16 Jul 2026 21:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=B3=E5=AE=9A=E4=BC=A0=E8=BE=93=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=AD=E5=BF=83=E7=94=9F=E4=BA=A7=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/git-build-deploy.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/git-build-deploy.ps1 b/scripts/git-build-deploy.ps1 index d94b504..64c7a06 100644 --- a/scripts/git-build-deploy.ps1 +++ b/scripts/git-build-deploy.ps1 @@ -95,8 +95,7 @@ if ! ssh -o BatchMode=yes -o ConnectTimeout=10 "$PRODUCTION_SERVER" \ "docker tag '$local_commit' '$remote_commit'" fi -ssh -o BatchMode=yes "$PRODUCTION_SERVER" \ - "REMOTE_IMAGE='$remote_commit' IMAGE_TAG='$image_tag' COMMIT_SHA='$commit_sha' bash -s" <<'PRODUCTION' +production_script="$(cat <<'PRODUCTION' set -Eeuo pipefail target=/mnt/PoolOne/apps/youyidian-notification-center @@ -169,6 +168,10 @@ printf '\nCONTAINER_IMAGE=' docker inspect -f '{{.Config.Image}}' youyidian-notification-center printf '\n' PRODUCTION +)" + +printf '%s\n' "$production_script" | ssh -o BatchMode=yes "$PRODUCTION_SERVER" \ + "REMOTE_IMAGE='$remote_commit' IMAGE_TAG='$image_tag' COMMIT_SHA='$commit_sha' bash -s" ok "通知中心已部署到 ${commit_sha}" '@