From 1baa7f5e51d08ff5ce3605f663b28e7353838f2a Mon Sep 17 00:00:00 2001 From: Erick Ruiz de Chavez Date: Tue, 5 Jan 2021 16:28:37 -0500 Subject: [PATCH] Update build file --- .github/workflows/node.js.yml | 46 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 79f4530..1be1b4b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,36 +1,26 @@ -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI +name: Build and Deploy site on: push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: [main] jobs: build: runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - name: SCP Files - uses: appleboy/scp-action@v0.1.1 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: "_site" - target: "/home/${{ secrets.USERNAME }}/beta.erickruizdechavez.com" - strip_components: 1 + - uses: actions/checkout@v2 + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: npm ci + - run: npm run build --if-present + - name: deploy site + uses: appleboy/scp-action@v0.1.1 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + source: "_site" + target: "/home/${{ secrets.USERNAME }}/beta.erickruizdechavez.com" + strip_components: 1