-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
settings: CI/CD 구축, package.json ci=false 설정
- githubaction & eslint 간의 build 실패 처리를 위한 ci-warning false 처리
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
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
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 서버의 배포 경로입니다. |
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