From 0a0ba69e6ab17393bc4aebc6ca39e3bb405d7368 Mon Sep 17 00:00:00 2001 From: yang Date: Tue, 3 Dec 2024 00:43:26 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20=ED=9B=84,=20Second=20Instance=20=EC=A2=85=EB=A3=8C?= =?UTF-8?q?=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml index 4ec1843..76360b0 100644 --- a/.github/workflows/CD.yaml +++ b/.github/workflows/CD.yaml @@ -58,13 +58,17 @@ jobs: # Build pnpm build + # Start second instance + pm2 start apps/server/ecosystem.config.js --only harmony-api2 --env production + + sleep 5 + # Restart first instance - pm2 restart harmony-api --env production || pm2 start apps/server/ecosystem.config.js --env production + pm2 restart apps/server/ecosystem.config.js --env production || pm2 start apps/server/ecosystem.config.js --env production - # Wait for server to start sleep 5 - # Restart second instance - pm2 restart harmony-api2 --env production || pm2 start apps/server/ecosystem.config.js --env production + # Stop second instance + pm2 stop harmony-api2 echo "Deployment Success"