Skip to content

Merge pull request #270 from boostcampwm2023/refactor/268-fe-refactor #36

Merge pull request #270 from boostcampwm2023/refactor/268-fe-refactor

Merge pull request #270 from boostcampwm2023/refactor/268-fe-refactor #36

name: Build and Scp frontend
on:
push:
paths:
- "FE/**"
branches:
- main
jobs:
build-and-push-frontend:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20.10.0"
- name: Install Dependencies and Build
run: |
cd ./FE
echo "${{secrets.ENV_FE}}" > .env
npm install --force
npm run build
- name: Deploy to NCloud
uses: appleboy/scp-action@master
with:
host: ${{secrets.VPC_HOST}}
username: ${{secrets.VPC_USER}}
password: ${{secrets.VPC_PASSWORD}}
port: ${{secrets.VPC_PORT}}
source: "./FE/build/*"
target: "/home/docker-byeolsoop/data/www"
strip_components: 2