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