Skip to content

Commit

Permalink
fix:cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
martinyonatann committed Jun 2, 2024
1 parent 194c751 commit 6c57114
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,10 @@ jobs:
npm install
npm run build
# Check if the process "i-mader.tech" is already running
pm2 describe i-mader.tech > /dev/null
# Get the exit status of the last command
PROCESS_STATUS=$?
# If the process is running, restart it; otherwise, start it
if [ $PROCESS_STATUS -eq 0 ]; then
echo "Restarting i-mader.tech..."
pm2 restart i-mader.tech
else
echo "Starting i-mader.tech..."
pm2 start npm --name "i-mader.tech" -- start
fi
pm2 stop i-mader.tech
pm2 start npm --name "i-mader.tech" -- start
# Save the PM2 process list
pm2 save
Expand Down

0 comments on commit 6c57114

Please sign in to comment.