Skip to content

Commit

Permalink
Merge pull request #437 from woowacourse-teams/develop
Browse files Browse the repository at this point in the history
* feat: 클래스 패키지 네이밍 대신 어노테이션을 통해 메서드를 선별하도록 수정 #393

* feat: 라운드 종료 여부 API에서 마스터 정보 제거 #394

* feat: 투표 종료 여부 조회 시, 마스터 정보 제거 #394

* feat: 방 초기화 확인 API에서 마스터 정보 제거 #394

* test: 투표 종료 여부 조회 테스트 수정

* test: RoomContentControllerTest Fixture 적용 #114

* refactor: MemberFixture 임시 네이밍 변경 #114

* refactor: MainPage 훅 디렉토리 수정 #276

* refactor: 잘못된 경로일 경우 홈 버튼 추가 #276

* refactor: NicknamePage 유틸과 훅 디렉토리 분리 #276

* refactor: ReadyPage에서 사용되는 컴포넌트를 페이지 디렉토리 내부로 이동 #276

* refactor: GamePage에서 사용되는 컴포넌트를 페이지 디렉토리 내부로 이동 #276

* refactor: RoundResultPage에서 사용되는 컴포넌트 페이지 디렉토리 내부로 이동 #276

* refactor: GameResultPage에서 사용되는 컴포넌트를 페이지 디렉토리 내부로 이동 #276

* refactor: SelectOption 디렉토리 수정 #276

* refactor: 완전한 공통 컴포넌트 외에는 common에서 components로 이동 #276

* refactor: page 디렉토리에 components 폴더 생성 #276

* test: RoomBalanceVoteControllerTest Fixture 적용 #114

* test: RoomControllerTest Fixture 적용 #114

* test: BalanceContentServiceTest Fixture 적용 #114

* test: RoomContentFacadeTest Fixture 적용 #114

* test: RoomBalanceVoteFacadeTest Fixture 적용 #114

* test: RoomFacadeTest Fixture 적용 #114

* test: RoomContentServiceTest Fixture 적용 #114

* test: RoomBalanceVoteServiceTest Fixture 적용 #114

* test: RoomMigratorTest Fixture 적용 #114

* test: MemberServiceTest Fixture 적용 #114

* test: RoomServiceTest Fixture 적용 #114

* test: RoomFacadeTest Fixture 추가 적용 #114

* test: RoomBalanceVoteFacadeTest Fixture 추가 적용 #114

* refactor: MembersFixture 제거 #114

* refactor: Fixture 객체 생성자 주입 사용 #114

* style: EntityFixtureUtils 위치 최상위 support 패키지로 변경 #114

* style: Fixture 객체 support-fixture-domain 패키지로 이동 #114

* refactor: init-test.sql 제거 #114

* refactor: 중복 코드 메서드화 #114

* refactor: Member Fixture 생성 간편화 메서드 추가 #114

* refactor: roomContents 생성 로직 간소화 #114

* refactor: BalanceOption, BalanceContent 생성 로직 간소화 #114

* refactor: 불필요한 방 생성 인자 제거 #114

* fix: option Fixture 사용 버그 수정 #114

* refactor: MemberFixture 리팩터링 실시 #397

* test: 사용하지 않은 메서드 제거 #397

* refactor: 방 생성 및 방 참여 API 호출에 쓰로틀링을 걸어 중복 호출 방지 #401

* refactor: 방 생성과 방 참여 로직 분리 #401

* refactor: 방 참여 가능 여부 판단 Query 분리 #401

* refactor: 방에 참여할 수 없을 때 에러를 던져 에러 폴백 UI로 처리 #401

* refactor: 투표 API에 쓰로틀링 적용 #401

* refactor: 투표 API 요청이 들어오자마자 선택 완료 상태로 변경 #401

* refactor: useThrottle 타입 강화 #401

* fix: mutation 성공했을 때도 버튼 disabled 상태 처리 #401

* refactor: 방 생성과 방 참여 이벤트 핸들러를 하나로 묶지 않고 isMaster 분기처리를 드러내기 #401

* refactor: 에러 처리 공통 로직 재사용을 위해 커스텀 훅으로 분리 #401

* refactor: 투표할 때 에러가 발생할 경우 롤백 로직 추가 #401

* feat: 타이머 로직을 worker에 위임 #403

* refactor: worker를 타이머에 적용하여 탭 전환시 발생하는 타이머 오차 개선 #403

* refactor: web worker 모킹 추가 #403

* refactor: 메인 스레드와 독립적인 worker thread의 타이머 로직을 테스트 할 수 없어 타이머 테스트 코드 제거 #403

* refactor: 네트워크 에러와 관리되지 않는 에러 분기 처리 추가 #407

* refactor: 에러 상태 코드 상수화 #407

* refactor: 처리되지 않는 에러도 에러 폴백 UI를 보여주고 sentry로 추적 #407

* style: 사용하지 않는 import문 제거 #397

* refactor: url 중복 제거 및 keywords 추가 #409

* refactor: 클래스 이름을 더 구체화하여 변경 #410

- 기존 `VoteContext`는 받아들이기에 추상적이었음
- 이를 투표의 현재 상황을 보여준다는 `VotingStatus`로 바꾸어 클래스 이름을 구체화 함

* refactor: 메서드 순서 및 누락된 어노테이션 추가 #410

* feat: VotingStatus에 API에 필요한 정보 및 메서드 추가 #410

* feat: 변경된 API에 맞추어 DTO 수정 #410

- FacadeTest, ControllerTest, DocumentTest 에 추가 내용 검증

* refactor: 사용하지 않는 생성자 제거 #410

* feat: 변경된 API에 맞추어 전반적인 로직 수정 #410

* refactor: 사용하지 않는 메서드 제거 #410

* style: import 문 재정렬 #410

* refactor: 사용하지 않는 메서드 제거 #410

* refactor: useThrottle any대신 Parameters 타입 적용 #401

* refactor: 불필요한 에러 조건문 제거 #407

* refactor: toast UI 여는 함수명을 명시적으로 showToast로 변경 #407

* refactor: modal UI를 띄우는 함수명을 명시적으로 showModal로 변경 #407

* feat: CD 스크립트 변경 v.01 #415

* fix: 길어진 실행 시간으로 인해 헬스 체크 시간을 증가함 #415

* feat: 변경된 인프라에 맞추어 Replication 코드 비활성화

* feat: fe cd dev script 작성 #414

* feat: fe cd prod script 작성 #414

* refactor: 사용하지 않는 코드 및 설정 제거

* fix: 길어진 실행 시간으로 인해 헬스 체크 시간을 증가함 #415

* feat: 변경된 인프라에 맞추어 Replication 코드 비활성화

* refactor: 사용하지 않는 코드 및 설정 제거

* fix: 길어진 실행 시간으로 인해 헬스 체크 시간을 증가함 v2 #415

* refactor: 사용하지 않는 필드 제거 #410

* style: 테스트 given-when-then 구문 추가 #410

* test: 각 테스트 별 assert 문 추가

* chore: 새 배포환경에 맞게 ci 스크립트 수정 #416

* chore: 새 배포환경에 맞게 cd 스크립트 수정 #416

* refactor: fe cd dev script job 하나로 합치고, 노드 버전 명시 및 artifact 관련 코드 삭제 #414

* refactor: fe cd prod script job 하나로 합치고, 노드 버전 명시 및 artifact 관련 코드 삭제 #414

* refactor: 쉘 스크립트를 환경을 분리하여 관리 #415

* refactor: 각각의 시크릿 키를 사용하여 env 파일을 생성하도록 수정 #414

* chore: script 파일 프로젝트 패키지에서 관리하도록 구성 #416

* chore: 잘못 설정된 스크립트 업로드 코드 제거 #416

* refactor: isJoinableQuery 불필요한 반환값 제거 #401

* refactor: 방 접근 API 요청 쿼리 상태값 isMaster로 분기처리 #401

* refactor: 사용하지 않는 메서드 제거 #410

* style: import 문 추가 및 메서드 순서 변경 #397

* chore: d-n 라벨 자동화 스크립트 작성 #422

* chore: 불필요한 코드 제거 및 github rest 사용 #422

* fix: AsyncErrorFallback Error Type 조건문 명확하게 명시 #407

* refactor: 한국 시간을 기준으로 주말에는 D-n 카운팅 안하도록 설정 #422

* refactor: description & keyword 추가 #409

* feat: 프론트엔드 코드 리뷰 리마인더 스크립트 작성 #424

* refactor: PR마다 마감일 추가 및 approved 상태인 경우 멘션하지 않도록 수정 #424

* feat: 해당 PR에 새로운 수정사항이 있는지 바로 확인할 수 있도록 PR 생성일과 마지막 수정 추가 #424

* feat: 수동 트리거 추가 #424

* fix: OS에 따라 이모지가 스크립트에서 이모지가 깨져 includes로 수정 #422

* fix: 라벨이 안달려 있는 경우 D-2 라벨 설정으로 수정 #422

* refactor: "FE" 라벨이 포함된 PR만 필터링 #422

* refactor: 라벨 이름에 포함되어 있는 이모티콘이 os에 따라 깨질 수 있으므로 FE 글자를 포함하는 코드로 수정 #424

* feat: 스크립트 작동 테스트를 위해 트리거 추가 #424

* style: 불필요한 import 제거 #427

* refactor: github-script를 활용하여 코드 수정 #424

* refactor: 특정 PR의 리뷰 상태를 가져오는 로직 및 디스코드 멘션에 필요한 맵핑 객체 추가 #424

* refactor: 사용하지 않는 node-fetch 모듈 삭제 #424

* refactor: try-catch 문 수정 #424

* feat: 게임 화면에서 투표 인원과 전체 인원을 응답받아 게임 중 투표 현황 보여주기 #427

* fix: 멘션이 되지 않는 문제 해결 #424

* chore: emotion Theme 타입에서 설정한 Theme 상수를 인식하도록 설정 #427

* refactor: 투표 폴링으로 인해 생긴 불필요한 리렌더링을 줄이기 위해 컴포넌트 분리 #427

* refactor: 응답값 도착 여부에 따라 opacity 적용하여 사용자 경험 개선 #427

* fix: 값이 0일때 도 보이도록 nullish 연산자 사용 #427

* refactor: 멘션이 안 되는 문제 해결 및 리뷰의 state가 약자로 보이도록 수정 #424

* fix: 멘션이 안 되는 문제 디스코드 아이디를 매핑하여 해결 #424

* fix: 시크릿키 참조 오류 수정 #424

* fix: 사용자언급과 상태 사이에 간격을 두어 멘션이 안 되는 문제 해결 #424

* feat: api 호출 시 허용된 멘션 항목을 바디에 추가 #424

* refactor: 알림이 오지 않아 allowed_mentions 속성에 들어가는 값 users에서 parse로 수정 #424

* feat: 서버 응답 확인 코드 추가 #424

* refactor: api 요청 시 오타 수정 #424

* refactor: 코드 리마인더 메세지에 대한 피드백 반영 및 승인된 PR에 대한 메세지에서 PR 생성자 멘션 되도록 수정 #424

* refactor: 디데이 중괄호 감싸기 및 마지막 수정 항목 제거 #424

* refactor: 링크가 임베드 되어 메세지가 길어져 임베드 되지 않도록 수정 #424

* refactor: 리뷰어 최신 상태만 출력되도록 수정 및 pr작성자는 리뷰어에서 제외 #424

* fix: 아직 리뷰를 남기지 않은 리뷰어가 있는 경우 승인 완료 안내 오류 해결 #424

* refactor: 라벨 스크립트 시간 이후에 올라온 PR에 바로 D-3이 부여되도록 수정 #432

* refactor: 정각 시간 설정시 과부화로 인해 지연되어 오전 10시 10분으로 수정 #432

* refactor: 테스트를 위해 설정했던 pr트리거 삭제 #432

* refactor: 정각 시간 설정시 과부화로 인해 지연되어 라벨 자동화 스크립트 자동 실행 시간 12시 10분으로 수정 #432

* refactor: 카테고리를 MySQL에서 VARCHAR로 관리하도록 변경 #435

* feat: 카테고리에 개발자 추가 #435

* fix: 의견 수렴하여 개발 카테고리 이름 변경 #435

* fix: 개발 카테고리 enum 이름 변경 #435

* refactor: 모든 리뷰어가 어프루브 상태인지 확인하는 디버깅 코드 추가 #432

* refactor: 디버깅을 위해 스크립트 트리거 임시 추가 #432

* refactor: 모든 리뷰어가 어프루브 상태인지 확인하는 로직 수정 #432

* refactor: 요청된 리뷰어 확인하는 디버깅 코드 추가 #432

* refactor: 디버깅 중 알림 가지 않도록 코드 수정 #432

* fix: 디버깅 중 알림 가지 않도록 코드 수정시 오류 해결 #432

* refactor: JPA 표준에 맞추어 `columnDefinition`으로 설정 #435

* refactor: 요청된 리뷰어를 제대로 불러오는지 확인하는 디버깅 코드 추가 #432

* refactor: pr에서 불러올 수 있는 정보를 확인하는 디버깅 코드 추가 #432

* refactor: requested_reviewers가 빈배열로 나와 FE 리뷰어 고정값으로 수정 #432

* refactor: FE리뷰어에서 PR작성자는 제외하도록 코드 수정 #432

* refactor: 필요없는 디버깅 코드 삭제 및 pr 트리거 삭제 #432

* refactor: 알림 정상 작동 확인 트리거 추가 #432

* refactor: PR 트리거 삭제 #432

* refactor: 다시 대기화면으로 못돌아오도록 navigate replace: true 추가 #427

---------

Co-authored-by: PgmJun <[email protected]>
Co-authored-by: rbgksqkr <[email protected]>
Co-authored-by: useon <[email protected]>
Co-authored-by: Yuseon Kim(썬데이) <[email protected]>
  • Loading branch information
5 people authored Dec 11, 2024
2 parents 1f9d62c + f6be80c commit 96577d8
Show file tree
Hide file tree
Showing 206 changed files with 2,321 additions and 1,670 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/be-cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,19 @@ jobs:
with:
name: app-artifact
path: ./backend/build/libs/app.jar
if-no-files-found: error

- name: Upload deploy scripts
uses: actions/upload-artifact@v4
with:
name: deploy-scripts
path: ./backend/scripts/dev/
if-no-files-found: error

deploy:
needs: build
timeout-minutes: 2
runs-on: [ self-hosted, linux, ARM64, dev ]
runs-on: [ dev, X64, Linux ]

steps:
- name: Download artifact file
Expand All @@ -55,8 +63,14 @@ jobs:
name: app-artifact
path: ~/app

- name: Download deploy scripts
uses: actions/download-artifact@v4
with:
name: deploy-scripts
path: ~/app/scripts

- name: Replace application to latest
run: sudo sh ~/scripts/replace-new-version.sh
run: sudo sh ~/app/scripts/replace-new-version.sh

- name: Health check latest application
run: sudo sh ~/scripts/health-check.sh
run: sudo sh ~/app/scripts/health-check.sh
103 changes: 28 additions & 75 deletions .github/workflows/be-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,114 +16,67 @@ jobs:
secrets:
secret_yml: ${{ secrets.PROD_SECRET_YML }}

deploy-a:
deploy:
needs: [ build ]
uses: ./.github/workflows/blue-green.yml
with:
self_hosted_runner: prod-a
self_hosted_runner: prod
artifact_name: ${{ needs.build.outputs.artifact_name }}
jar_name: ${{ needs.build.outputs.jar_name }}
profile: prod
app_path: ~/app

deploy-b:
needs: [ build ]
uses: ./.github/workflows/blue-green.yml
with:
self_hosted_runner: prod-b
artifact_name: ${{ needs.build.outputs.artifact_name }}
jar_name: ${{ needs.build.outputs.jar_name }}
profile: prod
app_path: ~/app

rollback-a:
name: "[Failure] Rollback Deploy A"
needs: [ deploy-a, deploy-b ]
if: failure() && (needs.deploy-a.result == 'failure' || needs.deploy-b.result == 'failure')
uses: ./.github/workflows/shutdown.yml
with:
self_hosted_runner: prod-a
port: ${{ needs.deploy-a.outputs.green_port }}

rollback-b:
name: "[Failure] Rollback Deploy B"
needs: [ deploy-a, deploy-b ]
if: failure() && (needs.deploy-a.result == 'failure' || needs.deploy-b.result == 'failure')
rollback:
name: "[Failure] Rollback Deploy"
needs: deploy
if: failure() && needs.deploy.result == 'failure'
uses: ./.github/workflows/shutdown.yml
with:
self_hosted_runner: prod-b
port: ${{ needs.deploy-b.outputs.green_port }}
self_hosted_runner: prod
port: ${{ needs.deploy.outputs.green_port }}

deploy-failure-notification:
name: "[Failure] Deploy Failure Notification"
needs: [ deploy-a, deploy-b ]
if: failure() && (needs.deploy-a.result == 'failure' || needs.deploy-b.result == 'failure')
needs: deploy
if: failure() && needs.deploy.result == 'failure'
runs-on: ubuntu-latest
steps:
- name: Send notification to Discord # todo
run: echo "테스트입니다"

configure-nginx-a:
needs: [ deploy-a, deploy-b ]
configure-nginx:
needs: deploy
uses: ./.github/workflows/nginx-port-forwarding.yml
with:
self_hosted_runner: prod-a
self_hosted_runner: prod
app_path: ~/app
old_port: ${{ needs.deploy-a.outputs.blue_port }}
new_port: ${{ needs.deploy-a.outputs.green_port }}
old_port: ${{ needs.deploy.outputs.blue_port }}
new_port: ${{ needs.deploy.outputs.green_port }}

configure-nginx-b:
needs: [ deploy-a, deploy-b ]
rollback-nginx:
name: "[Failure] Rollback Nginx"
needs: configure-nginx
if: failure() && (needs.configure-nginx.result == 'failure')
uses: ./.github/workflows/nginx-port-forwarding.yml
with:
self_hosted_runner: prod-b
self_hosted_runner: prod
app_path: ~/app
old_port: ${{ needs.deploy-b.outputs.blue_port }}
new_port: ${{ needs.deploy-b.outputs.green_port }}

rollback-nginx-a:
name: "[Failure] Rollback Nginx A"
needs: [ configure-nginx-a, configure-nginx-b ]
if: failure() && (needs.configure-nginx-a.result == 'failure' || needs.configure-nginx-b.result == 'failure')
uses: ./.github/workflows/nginx-port-forwarding.yml
with:
self_hosted_runner: prod-a
app_path: ~/app
old_port: ${{ needs.configure-nginx-a.outputs.new_port }}
new_port: ${{ needs.configure-nginx-a.outputs.old_port }}
old_shutdown: true

rollback-nginx-b:
name: "[Failure] Rollback Nginx B"
needs: [ configure-nginx-a, configure-nginx-b ]
if: failure() && (needs.configure-nginx-a.result == 'failure' || needs.configure-nginx-b.result == 'failure')
uses: ./.github/workflows/nginx-port-forwarding.yml
with:
self_hosted_runner: prod-b
app_path: ~/app
old_port: ${{ needs.configure-nginx-b.outputs.new_port }}
new_port: ${{ needs.configure-nginx-b.outputs.old_port }}
old_port: ${{ needs.configure-nginx.outputs.new_port }}
new_port: ${{ needs.configure-nginx.outputs.old_port }}
old_shutdown: true

configure-nginx-faliure-notification:
name: "[Failure] Nginx Failure Notification"
needs: [ configure-nginx-a, configure-nginx-b ]
if: failure() && (needs.configure-nginx-a.result == 'failure' || needs.configure-nginx-b.result == 'failure')
needs: configure-nginx
if: failure() && needs.configure-nginx.result == 'failure'
runs-on: ubuntu-latest
steps:
- name: Send notification to Discord # todo
run: echo "테스트입니다"

blue-shutdown-a:
needs: [ configure-nginx-a, configure-nginx-b ]
uses: ./.github/workflows/shutdown.yml
with:
self_hosted_runner: prod-a
port: ${{ needs.configure-nginx-a.outputs.old_port }}

blue-shutdown-b:
needs: [ configure-nginx-a, configure-nginx-b ]
blue-shutdown:
needs: configure-nginx
uses: ./.github/workflows/shutdown.yml
with:
self_hosted_runner: prod-b
port: ${{ needs.configure-nginx-b.outputs.old_port }}
self_hosted_runner: prod
port: ${{ needs.configure-nginx.outputs.old_port }}
2 changes: 1 addition & 1 deletion .github/workflows/be-ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
build:
timeout-minutes: 4
runs-on: [ self-hosted, linux, ARM64, dev ]
runs-on: ubuntu-latest

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
mkdir -p ${{ inputs.artifact_name }} && \
mv build/libs/*.jar ${{ inputs.artifact_name }}/${{ inputs.jar_name }} && \
mv scripts/* ${{ inputs.artifact_name }}/
mv scripts/${{ inputs.profile }}/* ${{ inputs.artifact_name }}/
- name: Upload artifact file
uses: actions/upload-artifact@v4
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/fe-cd-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: FE Build and Deploy for Develop

on:
push:
branches:
- develop # develop 브랜치에서만 실행
paths:
- 'frontend/**' # frontend 폴더가 변경된 경우에만 실행

jobs:
build-and-deploy:
name: FE Build and Deploy for Prod
runs-on: ubuntu-latest

steps:
# 1. Setup Node.js (Version 20)
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20

# 2. Repository Checkout
- name: Checkout Code
uses: actions/checkout@v3

# 3. Generate .env File from Individual Secrets
- name: Generate .env File
working-directory: ./frontend
run: |
echo "API_BASE_URL=${{ secrets.API_BASE_URL_DEV }}" >> .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
# 4. Install Dependencies
- name: Install Dependencies
working-directory: ./frontend
run: npm install

# 5. Build Project
- name: Build for Dev
working-directory: ./frontend
run: npm run build:prod

# 6. Configure AWS CLI
- name: Configure AWS CLI
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_REGION }}
# 7. Upload to S3
- name: Upload to S3 (Dev)
working-directory: ./frontend/dist
run: |
aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_DEV }} --delete
# 8. Invalidate CloudFront Cache
- name: Invalidate CloudFront Cache (Dev)
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_DEV }} --paths "/*"
60 changes: 60 additions & 0 deletions .github/workflows/fe-cd-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: FE Build and Deploy for Prod

on:
push:
branches:
- main # main 브랜치에서만 실행
paths:
- 'frontend/**' # frontend 폴더가 변경된 경우에만 실행

jobs:
build-and-deploy:
name: FE Build and Deploy for Prod
runs-on: ubuntu-latest

steps:
# 1. Setup Node.js (Version 20)
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20

# 2. Repository Checkout
- name: Checkout Code
uses: actions/checkout@v3

# 3. Generate .env File from Individual Secrets
- name: Generate .env File
working-directory: ./frontend
run: |
echo "API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
# 4. Install Dependencies
- name: Install Dependencies
working-directory: ./frontend
run: npm install

# 5. Build Project
- name: Build for Prod
working-directory: ./frontend
run: npm run build:prod

# 6. Configure AWS CLI
- name: Configure AWS CLI
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ secrets.AWS_REGION }}
# 7. Upload to S3
- name: Upload to S3 (Prod)
working-directory: ./frontend/dist
run: |
aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_PROD }} --delete
# 8. Invalidate CloudFront Cache
- name: Invalidate CloudFront Cache (Prod)
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD }} --paths "/*"
Loading

0 comments on commit 96577d8

Please sign in to comment.