Skip to content

Commit 40fcd00

Browse files
committed
fix: run pm2 restart in background to prevent SSH timeout
1 parent 1a2408d commit 40fcd00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
host: ${{ secrets.LIGHTSAIL_HOST }}
6262
username: ${{ secrets.LIGHTSAIL_USERNAME }}
6363
key: ${{ secrets.LIGHTSAIL_SSH_KEY }}
64-
command_timeout: 30s
6564
script: |
6665
set -e
6766
cd ~/hamsurang-discord-bot
@@ -79,4 +78,6 @@ jobs:
7978
8079
git pull origin main
8180
pnpm install --frozen-lockfile
82-
pm2 startOrRestart ecosystem.config.cjs --env production
81+
nohup pm2 startOrRestart ecosystem.config.cjs --env production > /dev/null 2>&1 &
82+
sleep 2
83+
pm2 status

0 commit comments

Comments
 (0)