Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DFanso committed Dec 8, 2024
1 parent a846637 commit 4d69e1e
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,24 @@ jobs:
pm2 stop dfanso-tunnel || true
pm2 delete dfanso-tunnel || true
# Start new PM2 process
pm2 start ecosystem.config.js && \
pm2 save && \
pm2 startup"
# Start new PM2 process with error checking
if ! pm2 start ecosystem.config.js; then
echo 'Failed to start PM2 process'
pm2 logs dfanso-tunnel --lines 50
exit 1
fi
# Save PM2 process list and set up startup
pm2 save
pm2 startup
# Check if process is running
if ! pm2 pid dfanso-tunnel > /dev/null; then
echo 'PM2 process is not running'
pm2 logs dfanso-tunnel --lines 50
exit 1
fi
# Show process status
pm2 list
pm2 logs dfanso-tunnel --lines 20"

0 comments on commit 4d69e1e

Please sign in to comment.