This commit is contained in:
Weiming committed 2026-06-27 11:53:31 +08:00
1 parent d9997375ee
commit 5e6c6933c4
1 file changed
+5 -2
+5 -2
View File
@@ -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"'