From 4bf7fbe10fed3116a424e81d9cdb2680894d114c Mon Sep 17 00:00:00 2001 From: Amos Laboso Date: Wed, 31 Jan 2024 16:36:00 +0300 Subject: [PATCH] Update node.js.yml Added step to restart next after deploying --- .github/workflows/node.js.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3e58ac9..03224c6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,4 +37,20 @@ jobs: port: ${{ secrets.PORT }} source: .next/* target: /usr/knhts/moh-knhts-web - strip_components: 1 + + restart_next: + + runs-on: ubuntu-latest + + needs: build_and_deploy + + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: cd /usr/knhts/moh-knhts-web && sh deploy.sh +