chore: update react, react-query. Use retry #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |