fix: update scripts #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
#FRONTEND | |
name: Build React App & Deploy to server | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 16.x to Build | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
#cache: 'npm' | |
- run: yarn | |
working-directory: ./frontend | |
- run: yarn build:client | |
- name: ssh deploy on remote server | |
uses: easingthemes/[email protected] | |
with: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
REMOTE_HOST: ${{ secrets.DB_HOST }} | |
REMOTE_USER: centos | |
REMOTE_PORT: 22 | |
SOURCE: './frontend/build/' | |
TARGET: ${{ secrets.DEPLOY_TARGET }} | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
REMOTE_HOST: ${{ secrets.DB_HOST }} | |
REMOTE_USER: centos | |
REMOTE_PORT: 22 | |
SOURCE: './frontend/build/' | |
TARGET: ${{ secrets.DEPLOY_TARGET }} |