From 11fc27788e45a59481a6b0930985f84b7e5d16fd Mon Sep 17 00:00:00 2001 From: Altan Date: Tue, 12 Dec 2023 21:38:52 +1300 Subject: [PATCH] Try improve workflow script --- .github/workflows/node.js.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7cafd00..bcb51c8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -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