Skip to content

Commit

Permalink
🚧 Config pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolerious committed Jul 29, 2024
1 parent c056ac7 commit 01692e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/English-Burning-Backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jobs:
# server ip
IP: ${{ secrets.SERVER_IP_ADDRESS }}
# shell to execute on server
SHELL: "source /etc/profile && cd /var/www/html/English-Burning-Backend/ && /bin/bash ./kill_pm2.sh && cp ../ecosystem.config.js ."
SHELL: "pnpm i && pm2 start --env=production"
SHELL: "source /etc/profile && cd /var/www/html/English-Burning-Backend/ && /bin/bash ./kill_pm2.sh && cp ../ecosystem.config.js . && pnpm i && pm2 start --env=production"
2 changes: 2 additions & 0 deletions kill_pm2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ RUNNING_PROCESSES=$(pm2 jlist | jq '[.[] | select(.pm2_env.status == "online")]

if [ "$RUNNING_PROCESSES" -gt 0 ]; then
pm2 stop all
pnpm i
pm2 start --env=production
echo "Stopped all running PM2 processes."
else
echo "No running PM2 processes to stop."
Expand Down

0 comments on commit 01692e5

Please sign in to comment.