Skip to content

Merge pull request #58 from route-master/feature/plancard #46

Merge pull request #58 from route-master/feature/plancard

Merge pull request #58 from route-master/feature/plancard #46

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: npm package deploy # Workflow 이름
on: # Event 감지
push:
branches:
- develop
jobs: # Job 설정
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code. # Repo checkout
uses: actions/checkout@v3
- name: Check Node v # Node v 확인
run: node -v
- name: Install dependencies # 의존 파일 설치
run: npm install
- name: Generate build # React Build
run: npm run build
- name: SCP over ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
source: './build'
target: '/home/ubuntu'
- name: Copy build files to public folder over ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cp -rp build/* public