From b9cf255dd75a843c1143fa5ad67c6c00ce96cb32 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Tue, 2 Jun 2020 12:33:36 +0200 Subject: [PATCH] update node.js.yml x3 --- .github/workflows/node.js.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 27fbba0..aa483aa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -3,8 +3,17 @@ name: Deploy, Install, Build & Run on: [push] jobs: - build: + deploy: + runs-on: self-hosted + steps: + - uses: actions/checkout@v1 + + - name: Delete old Dir & create a new one + run: rm -rf /home/arthur/website && mkdir /home/arthur/website + + build: + needs: deploy runs-on: self-hosted steps: @@ -22,5 +31,13 @@ jobs: - name: Build run: yarn build-all + run: + needs: build + runs-on: self-hosted + + steps: + - name: Close old daemon + run: pm2 delete next + - name: Run run: pm2 start yarn --name "next" -- start \ No newline at end of file