Skip to content

Commit

Permalink
Try improve workflow script
Browse files Browse the repository at this point in the history
  • Loading branch information
altan-me committed Dec 12, 2023
1 parent 57a7b16 commit 11fc277
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- name: Start or Restart Yawmi
- name: Manage Yawmi Process
run: |
if ! pm2 list | grep -q yawmi; then
pm2 start --name 'yawmi' index.js
if ! pm2 list | grep -q 'yawmi'; then
echo "Starting yawmi for the first time"
pm2 start index.js --name yawmi
else
echo "Yawmi already running. Restarting..."
pm2 restart yawmi
fi

0 comments on commit 11fc277

Please sign in to comment.