Skip to content

Commit

Permalink
settings: CI/CD 구축, package.json ci=false 설정
Browse files Browse the repository at this point in the history
- githubaction & eslint 간의 build 실패 처리를 위한 ci-warning false 처리
  • Loading branch information
pjm2571 committed Oct 23, 2024
1 parent 9bc95c9 commit cc934f5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/github-action-client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI/CD Front Pipeline

on:
push:
branches: [ "master" ]

# 워크플로우가 저장소의 콘텐츠를 읽을 수 있는 권한을 갖도록 설정
permissions:
contents: read

jobs:
Front-Build-Deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Build App
run: |
cd ./src
npm install
npm run build
- name: Deploy to Prod Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
source: "./build/*" # build 폴더 안의 모든 파일을 가리킵니다.
target: "/home/ubuntu/nginx-vol/" # 이 경로는 EC2 서버의 배포 경로입니다.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "CI=false react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down

0 comments on commit cc934f5

Please sign in to comment.