From 5e6c6933c4c9c31142a50b6ee45e452630de0162 Mon Sep 17 00:00:00 2001 From: Weiming Date: Sat, 27 Jun 2026 11:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b779473..4fbfd14 100644 --- a/.drone.yml +++ b/.drone.yml @@ -52,11 +52,14 @@ steps: - set -e - 'DEPLOY_PATH="/www/wwwroot/node_project"' - 'ARCHIVE="/tmp/feishu-approval.tar.gz"' - - pm2 stop feishu_approval + - 'APP_NAME="feishu_approval"' + - 'LEGACY_APP_NAME="feishu-approval"' + - 'pm2 describe "$APP_NAME" >/dev/null 2>&1 && pm2 stop "$APP_NAME" || true' + - 'pm2 describe "$LEGACY_APP_NAME" >/dev/null 2>&1 && pm2 stop "$LEGACY_APP_NAME" || true' - test -f "$ARCHIVE" - mkdir -p "$DEPLOY_PATH" - find "$DEPLOY_PATH" -mindepth 1 -delete - tar xzf "$ARCHIVE" -C "$DEPLOY_PATH" - chmod +x "$DEPLOY_PATH/deploy/start.sh" - echo "Deploy OK -> $DEPLOY_PATH" - - pm2 start feishu_approval + - 'pm2 describe "$APP_NAME" >/dev/null 2>&1 && pm2 restart "$APP_NAME" --update-env || pm2 start "$DEPLOY_PATH/server.js" --name "$APP_NAME"'