Skip to content

Commit

Permalink
PA-Recruitment-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
minsu26 committed Sep 30, 2024
2 parents 9565e1d + a0c5fba commit fc316f2
Show file tree
Hide file tree
Showing 76 changed files with 1,025 additions and 586 deletions.
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

참고해야할 부분 작성

## 💌 빌드 완료 스크린샷

`npm run build` 실행 후 에러 없는 화면을 캡쳐하여 보여주세요!

## 💬 참고 사항

참고해야할 부분 작성
68 changes: 51 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,61 @@
name: Deploy to Server
name: Deploy to EC2 server

on:
push:
branches:
- main
- develop # develop 브랜치에 푸시될 때마다 실행

jobs:
build:
name: Build
name: Build and Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Execute deploy script on EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: 22
script: |
cd ~/STUDIO-EYE-WEB-PROMOTION
git pull origin main
sudo systemctl restart nginx
# 1. Checkout the code from the repository (빌드 폴더는 무시됨)
- name: Checkout code
uses: actions/checkout@v3

# 2. Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.19.1' # 서버에서 사용 중인 Node.js 버전

# 3. Install the dependencies
- name: Install dependencies
run: npm install

# 4. Build the project
- name: Build project
run: CI=false npm run build # 빌드 과정에서 환경 변수를 사용하여 빌드
env:
REACT_APP_GATEWAY_URL: ${{ secrets.REACT_APP_GATEWAY_URL }}
REACT_APP_PROMOTION_URL: ${{ secrets.REACT_APP_PROMOTION_URL }}

# 5. Create SSH key file from GitHub Secrets (Private key)
- name: Create SSH key file
run: |
echo "${{ secrets.SERVER_SSH_KEY }}" > id_rsa
chmod 600 id_rsa
# 6. Transfer build files to EC2 via SCP
- name: Transfer build files to EC2
run: |
scp -o StrictHostKeyChecking=no -i id_rsa -r ./build/* ubuntu@${{ secrets.SERVER_HOST }}:/home/ubuntu/STUDIO-EYE-WEB-PROMOTION/build/
# 7. Clean up SSH key file (for security purposes)
- name: Clean up SSH key
run: rm id_rsa # SSH 키를 삭제하여 보안 유지

# 8. Execute commands on EC2 to update the code and restart NGINX
- name: Execute deploy script on EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ubuntu
key: ${{ secrets.SERVER_SSH_KEY }} # GitHub Secrets에서 비공개 키 사용
port: 22
script: |
cd ~/STUDIO-EYE-WEB-PROMOTION
sudo chmod -R 755 ./build # 권한 설정
sudo systemctl restart nginx # NGINX 재시작
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/coverage

# # production
# /build
/build

# misc
.DS_Store
Expand Down
Binary file removed build/favicon.png
Binary file not shown.
Binary file removed build/fonts/Pretendard-Bold.woff2
Binary file not shown.
Binary file removed build/fonts/Pretendard-Light.woff2
Binary file not shown.
Binary file removed build/fonts/Pretendard-Medium.woff2
Binary file not shown.
Binary file removed build/fonts/Pretendard-Regular.woff2
Binary file not shown.
Binary file removed build/fonts/Pretendard-SemiBold.woff2
Binary file not shown.
25 changes: 0 additions & 25 deletions build/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions build/robots.txt

This file was deleted.

11 changes: 0 additions & 11 deletions build/static/css/main.60c3feea.css

This file was deleted.

1 change: 0 additions & 1 deletion build/static/css/main.60c3feea.css.map

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file removed build/static/media/circle.08740893a51c20d62d8d.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions build/static/media/faq.f50e078823c399c6fc6b002d4de85c7b.svg

This file was deleted.

4 changes: 0 additions & 4 deletions build/static/media/home.a5a15404137c5a97fffcc3da3249c0bf.svg

This file was deleted.

16 changes: 0 additions & 16 deletions build/static/media/infoIcon.d157a35b448462e956ffea0322aaf4ff.svg

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions build/static/media/leftArrow.f33e23f2bcbfb282c3b83ba2a7d4e1c0.svg

This file was deleted.

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions build/static/media/news.b4bb8698c2cdaf427eb4c5bc04611148.svg

This file was deleted.

Binary file removed build/static/media/pa-logo.77b3cf8fafbd96d74adb.png
Binary file not shown.

This file was deleted.

13 changes: 0 additions & 13 deletions build/static/media/plusIcon.0f1a9a2332ca037a92f75fcf0f5f27f4.svg

This file was deleted.

13 changes: 0 additions & 13 deletions build/static/media/private.df8af96f00a89cba1f3421c0ec7f170e.svg

This file was deleted.

13 changes: 0 additions & 13 deletions build/static/media/public.3d306c82483e0491c9e31f934ae39be2.svg

This file was deleted.

This file was deleted.

Loading

0 comments on commit fc316f2

Please sign in to comment.