Skip to content

fix: handle error

fix: handle error #20

Workflow file for this run

name: Deploy
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Yarn it!
run: |
yarn install
yarn build
- name: Deploy
uses: appleboy/scp-action@master
with:
host: '${{ secrets.HOST }}'
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: 'package.json,yarn.lock,dist/**'
target: '/var/www/node/hip2.sinpapeles'
- name: Restart
uses: appleboy/ssh-action@master
with:
host: '${{ secrets.HOST }}'
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
yarn --cwd /var/www/node/hip2.sinpapeles install --production
service hip2.sinpapeles restart