From 23006469fbec93d5b6ebb66b0d7661164b2c12b6 Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Tue, 21 Apr 2026 23:28:35 +0900 Subject: [PATCH 1/6] =?UTF-8?q?chore:=20package.json=EC=97=90=20format:che?= =?UTF-8?q?ck=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - prettier --check . 로 prettier 포맷 검사 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 75b0bff..4e6611c 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", + "format:check": "prettier --check .", "preview": "vite preview", "prepare": "husky" }, From 2437177f99f9398d93552ce1118b9c64c2d94294 Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Wed, 22 Apr 2026 00:56:33 +0900 Subject: [PATCH 2/6] =?UTF-8?q?chore:=20PR=20CI=20=EB=B0=8F=20=ED=94=84?= =?UTF-8?q?=EB=A1=A0=ED=8A=B8=EC=97=94=EB=93=9C=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC=EC=9D=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PR 생성 시 lint, format:check, build 자동 실행 (pr-ci.yml) - main 머지 시 S3 업로드 및 CloudFront 캐시 무효화 (front-deploy.yml) - format:check 스크립트 package.json에 추가 --- .github/workflows/front-deploy.yml | 39 ++++++++++++++++++++++++++++++ .github/workflows/pr-ci.yml | 35 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/front-deploy.yml create mode 100644 .github/workflows/pr-ci.yml diff --git a/.github/workflows/front-deploy.yml b/.github/workflows/front-deploy.yml new file mode 100644 index 0000000..c3788f9 --- /dev/null +++ b/.github/workflows/front-deploy.yml @@ -0,0 +1,39 @@ +name: Frontend Deploy + +on: + push: + branches: [main] +# main에 머지(push)될 때 실행 + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + + - run: yarn install --immutable + - run: yarn build + # dist/ 폴더 생성 + + - uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + # GitHub Secrets에 저장한 AWS 키로 인증 + + - name: S3 업로드 + run: aws s3 sync dist/ s3://${{ secrets.S3_BUCKET }} --delete + # dist/ 폴더를 S3에 동기화 + # --delete: S3에만 있고 dist/에 없는 파일은 삭제 (이전 빌드 파일 정리) + + - name: CloudFront 캐시 무효화 + run: | + aws cloudfront create-invalidation \ + --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \ + --paths "/*" + # 전체 캐시 무효화 → 사용자가 새 빌드 파일을 즉시 받을 수 있게 diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml new file mode 100644 index 0000000..2f38d48 --- /dev/null +++ b/.github/workflows/pr-ci.yml @@ -0,0 +1,35 @@ +name: PR CI +# GitHub Actions 탭에 표시되는 이름 + +on: + pull_request: +# base branch 제한 없이 PR이면 CI 수행 + +jobs: + check: + runs-on: ubuntu-latest + # GitHub이 제공하는 우분투 서버에서 실행 + steps: + - uses: actions/checkout@v4 + # 레포 코드를 서버에 내려받기 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + # Node.js 22 설치, yarn 캐시 활성화 (두 번째 실행부터 빠름) + + - run: yarn install --immutable + # yarn.lock 기준으로 설치, lock 파일 변경 불가 (CI 안전장치) + + - run: yarn lint + # ESLint 검사 (console.log 등 룰 위반 시 실패) + + - run: yarn format:check + # Prettier 포맷 검사 (포맷 안 맞으면 실패) + + - run: yarn build + # TypeScript 타입체크 + Vite 빌드 (둘 중 하나라도 실패하면 머지 불가) + + # - run: yarn test + # 테스트 추가되면 활성화 From cbf52f2c5b0e33ac61fe76f601211b1a745bd16b Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Wed, 22 Apr 2026 01:53:15 +0900 Subject: [PATCH 3/6] =?UTF-8?q?chore:=20GitHub=20Actions=EC=97=90=20corepa?= =?UTF-8?q?ck=20enable=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CI 환경의 기본 yarn이 v1이라 yarn berry 실행 불가 문제 수정 - corepack이 package.json의 packageManager 필드를 읽어 yarn@4.13.0으로 자동 전환" --- .github/workflows/front-deploy.yml | 3 +++ .github/workflows/pr-ci.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/front-deploy.yml b/.github/workflows/front-deploy.yml index c3788f9..9463922 100644 --- a/.github/workflows/front-deploy.yml +++ b/.github/workflows/front-deploy.yml @@ -15,6 +15,9 @@ jobs: node-version: 22 cache: yarn + - run: corepack enable + # package.json의 packageManager 버전(yarn berry)으로 자동 전환 + - run: yarn install --immutable - run: yarn build # dist/ 폴더 생성 diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 2f38d48..3a06694 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -19,6 +19,9 @@ jobs: cache: yarn # Node.js 22 설치, yarn 캐시 활성화 (두 번째 실행부터 빠름) + - run: corepack enable + # package.json의 packageManager 버전(yarn berry)으로 자동 전환 + - run: yarn install --immutable # yarn.lock 기준으로 설치, lock 파일 변경 불가 (CI 안전장치) From 45daad81b6516bbbf23cedc6124f53182bbd9940 Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Wed, 22 Apr 2026 01:58:00 +0900 Subject: [PATCH 4/6] =?UTF-8?q?chore:=20corepack=20enable=EC=9D=84=20setup?= =?UTF-8?q?-node=20=EC=9D=B4=EC=A0=84=EC=9C=BC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - yarn berry 버전 불일치 오류 수정 - corepack이 먼저 활성화되어야 setup-node의 cache가 올바르게 동작 --- .github/workflows/front-deploy.yml | 6 +++--- .github/workflows/pr-ci.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/front-deploy.yml b/.github/workflows/front-deploy.yml index 9463922..7186afb 100644 --- a/.github/workflows/front-deploy.yml +++ b/.github/workflows/front-deploy.yml @@ -10,14 +10,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: corepack enable + # package.json의 packageManager 버전(yarn berry)으로 자동 전환 + - uses: actions/setup-node@v4 with: node-version: 22 cache: yarn - - run: corepack enable - # package.json의 packageManager 버전(yarn berry)으로 자동 전환 - - run: yarn install --immutable - run: yarn build # dist/ 폴더 생성 diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 3a06694..e4daaea 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -13,15 +13,15 @@ jobs: - uses: actions/checkout@v4 # 레포 코드를 서버에 내려받기 + - run: corepack enable + # package.json의 packageManager 버전(yarn berry)으로 자동 전환 + - uses: actions/setup-node@v4 with: node-version: 22 cache: yarn # Node.js 22 설치, yarn 캐시 활성화 (두 번째 실행부터 빠름) - - run: corepack enable - # package.json의 packageManager 버전(yarn berry)으로 자동 전환 - - run: yarn install --immutable # yarn.lock 기준으로 설치, lock 파일 변경 불가 (CI 안전장치) From e02db843e3d6a469d040681c56f3d73a62d7ee29 Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Wed, 22 Apr 2026 02:01:51 +0900 Subject: [PATCH 5/6] =?UTF-8?q?chore:=20ESLint=EC=97=90=EC=84=9C=20.yarn?= =?UTF-8?q?=20=EB=B0=8F=20.pnp=20=ED=8C=8C=EC=9D=BC=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .yarn/sdks, .pnp.cjs 등 yarn berry 내부 파일이 lint 대상에 포함되는 문제 수정 --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 1b51e9a..b648385 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,7 +6,7 @@ import tseslint from 'typescript-eslint'; import { defineConfig, globalIgnores } from 'eslint/config'; export default defineConfig([ - globalIgnores(['dist']), + globalIgnores(['dist', '.yarn/', '.pnp.cjs', '.pnp.loader.mjs']), { files: ['**/*.{ts,tsx}'], extends: [ From ea8336d531ca4709a4989cbe940c79127ab49128 Mon Sep 17 00:00:00 2001 From: 2seb2 Date: Wed, 22 Apr 2026 02:08:47 +0900 Subject: [PATCH 6/6] =?UTF-8?q?chore:=20prettierignore=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=9D=B4=EC=8A=88=20=ED=85=9C=ED=94=8C?= =?UTF-8?q?=EB=A6=BF=20=ED=8F=AC=EB=A7=B7=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .yarn, .pnp 파일을 prettier 검사 대상에서 제외 - issue-template.md prettier 포맷 적용 --- .github/ISSUE_TEMPLATE/issue-template.md | 3 +-- .prettierignore | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .prettierignore diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index 0da94fd..af13453 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -1,11 +1,10 @@ --- name: Issue Template about: 이슈를 생성할 때 사용해주세요. -title: "[type] " +title: '[type] ' labels: '' assignees: '' type: Feature - --- ## 📄 이슈 설명 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7e812fd --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +.yarn +.pnp.cjs +.pnp.loader.mjs