Update build file

This commit is contained in:
Erick Ruiz de Chavez 2021-01-05 16:28:37 -05:00
parent f2f3b996ee
commit 1baa7f5e51

View file

@ -1,36 +1,26 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Build and Deploy site
name: Node.js CI
on: on:
push: push:
branches: [ main ] branches: [main]
pull_request:
branches: [ main ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: setup node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: 14.x
- run: npm ci - run: npm ci
- run: npm run build --if-present - run: npm run build --if-present
- name: SCP Files - name: deploy site
uses: appleboy/scp-action@v0.1.1 uses: appleboy/scp-action@v0.1.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
source: "_site" source: "_site"
target: "/home/${{ secrets.USERNAME }}/beta.erickruizdechavez.com" target: "/home/${{ secrets.USERNAME }}/beta.erickruizdechavez.com"
strip_components: 1 strip_components: 1