From ec33ff57a7e6c8b06647c4ca290198fce0e1579e Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 19:55:51 +0900 Subject: [PATCH 01/10] =?UTF-8?q?init:=20ci.yml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflow/ci.yml | 116 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 .github/workflow/ci.yml diff --git a/.github/workflow/ci.yml b/.github/workflow/ci.yml new file mode 100644 index 0000000..7753ed0 --- /dev/null +++ b/.github/workflow/ci.yml @@ -0,0 +1,116 @@ +name: ci + +on: + push: + branches: [main, dev] + pull_request: + branches: [main, dev] + +permissions: + contents: read # 코드 읽기 권한 + pull-requests: write # 자동리뷰어 설정을 위한 쓰기 권한 + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + # 저장소 코드 다운로드 + - name: Checkout Code + uses: actions/checkout@v5 + # pnpm 설치 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + # pnpm store 캐싱 + - name: Get pnpm store directory + id: pnpm-cache + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v5 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: ${{ runner.os }}-pnpm- + + # node.js 환경 설정 + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: "24.x" + # 라이브러리 설치 + - name: Install dependencies + run: pnpm install --frozen-lockfile + # 프로젝트 린트 검사 및 타입 검사 + - name: Check project + id: check_step + run: pnpm run lint && pnpm exec tsc --noEmit + # 프로젝트 빌드 + - name: Build project + id: build_step + run: pnpm run build + continue-on-error: true + + # 빌드 결과 + - name: Output build result + if: github.event_name == 'pull_request' && always() + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: build-result + message: | + ### 🚀 빌드 결과 + ${{ steps.check_step.outcome == 'success' && '✅ **린트 검사 완료**' || '❌ **린트 검사 실패**'}} + ${{ steps.build_step.outcome == 'success' && '✅ **빌드 성공**' || '❌ **빌드 실패**' }} + +
+ 로그 확인하기 +
+ + Actions 탭에서 자세히 보기 + +
+ + # 빌드 결과 디스코드 알람 보내기 + - name: Notify Discord Alarm + if: github.event_name == 'pull_request' && always() + run: | + PR_TITLE="${{ github.event.pull_request.title }}" + PR_USER="${{ github.event.pull_request.user.login }}" + PR_URL="${{ github.event.pull_request.html_url }}" + + if [ "${{ steps.build_step.outcome }}" == "success" ]; then + COLOR=3066993 + TITLE="✅ 빌드 성공" + else + COLOR=15158332 + TITLE="❌ 빌드 실패" + fi + + DESCRIPTION="**🚀 Title :** \`$PR_TITLE\`\n **👤작성자 :** \`$PR_USER\`\n\n**[🔎 PR보러가기]($PR_URL)**" + curl -H "Content-Type: application/json" \ + -d "{ + \"embeds\": [{ + \"title\": \"$TITLE\", + \"description\": \"$DESCRIPTION\", + \"color\": $COLOR + }] + }" \ + "${{ secrets.DISCORD_WEBHOOK_URL }}" + # 빌드 실패 시, 종료 + - name: Check Build Status + if: steps.build_step.outcome == 'failure' + run: exit 1 + assign: + runs-on: ubuntu-latest + steps: + - name: auto-assign-author-and-reviewer + if: github.event_name == 'pull_request'&&github.event.action=='opened' + uses: hkusu/review-assign-action@v1 + with: + assignees: ${{github.actor}} # 담당자 설정 + reviewers: # 리뷰어 설정 (본인자동 제외) + - hummingbbird + - odukong + - u-zzn + - qowjdals23 From 86d081b73c1b5607781ddaedde25a4aa55d1f1fe Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 19:56:13 +0900 Subject: [PATCH 02/10] =?UTF-8?q?init:=20cd.yml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EB=B0=8F=20build.sh=20=ED=8C=8C=EC=9D=BC=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflow/cd.yml | 29 +++++++++++++++++++++++++++++ build.sh | 5 +++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflow/cd.yml create mode 100644 build.sh diff --git a/.github/workflow/cd.yml b/.github/workflow/cd.yml new file mode 100644 index 0000000..a97d719 --- /dev/null +++ b/.github/workflow/cd.yml @@ -0,0 +1,29 @@ +name: cd + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Install mustache + run: sudo apt-get update && sudo apt-get install -y ruby && gem install mustache + - name: creates output + run: sh ./build.sh + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }} + with: + source-directory: "output" + destination-github-username: odukong + destination-repository-name: COMFIT-CLIENT + user-email: ${{ secrets.EMAIL }} + commit-message: ${{ github.event.commits[0].message }} + target-branch: ${{ github.ref_name }} + - name: Test get variable exported by push-to-another-repository + run: echo $DESTINATION_CLONED_DIRECTORY diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..9ca5e3f --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd ../ +mkdir output +cp -R ./COMFIT-CLIENT/* ./output +cp -R ./output ./COMFIT-CLIENT/ \ No newline at end of file From 2e47d5200d37b2a072636c8e4f28662d3f4145ef Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 19:58:59 +0900 Subject: [PATCH 03/10] =?UTF-8?q?init:=20vercel.json=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vercel이 모든 경로에 대해 index.html파일을 찾을 수 있도록하는 vercel.json 파일 추가 --- vercel.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..1323cda --- /dev/null +++ b/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/(.*)", + "destination": "/index.html" + } + ] +} From c6b74dd316f97d6d8c59509e74a1e27d83416615 Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 20:37:36 +0900 Subject: [PATCH 04/10] =?UTF-8?q?fix:=20workflows=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=EB=AA=85=20=EC=88=98=EC=A0=95=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - workflow 폴더명을 workflows로 변경하였습니다. --- .github/{workflow => workflows}/cd.yml | 0 .github/{workflow => workflows}/ci.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{workflow => workflows}/cd.yml (100%) rename .github/{workflow => workflows}/ci.yml (100%) diff --git a/.github/workflow/cd.yml b/.github/workflows/cd.yml similarity index 100% rename from .github/workflow/cd.yml rename to .github/workflows/cd.yml diff --git a/.github/workflow/ci.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflow/ci.yml rename to .github/workflows/ci.yml From 339baa9fefb18fccb08eb3336250af4ae7b088d8 Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 20:39:54 +0900 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20=EC=9E=90=EB=8F=99=EB=A6=AC?= =?UTF-8?q?=EB=B7=B0=EC=96=B4=20=EC=84=A4=EC=A0=95=20=EB=AC=B8=EB=B2=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7753ed0..7dfdb26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,8 +109,4 @@ jobs: uses: hkusu/review-assign-action@v1 with: assignees: ${{github.actor}} # 담당자 설정 - reviewers: # 리뷰어 설정 (본인자동 제외) - - hummingbbird - - odukong - - u-zzn - - qowjdals23 + reviewers: hummingbbird, odukong, u-zzn, qowjdals23 From 9892587c0dac711b0709a6242bdd52ac52884c9b Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 21:45:59 +0900 Subject: [PATCH 06/10] =?UTF-8?q?refactor:=20=EB=A6=B0=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=8F=20=ED=83=80=EC=9E=85=20=EA=B2=80=EC=82=AC=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=EC=99=80=20=EB=AC=B4=EA=B4=80=ED=95=98=EA=B2=8C=20ste?= =?UTF-8?q?p=20=EC=A7=84=ED=96=89=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 린트 및 타입 검사가 실패해도 다음 build단계를 수행하도록 continu-on-error 속성 추가 --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dfdb26..3403b72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: - name: Check project id: check_step run: pnpm run lint && pnpm exec tsc --noEmit + continue-on-error: true # 프로젝트 빌드 - name: Build project id: build_step @@ -99,7 +100,7 @@ jobs: "${{ secrets.DISCORD_WEBHOOK_URL }}" # 빌드 실패 시, 종료 - name: Check Build Status - if: steps.build_step.outcome == 'failure' + if: steps.check_step.outcome == 'failure' || steps.build_step.outcome == 'failure' run: exit 1 assign: runs-on: ubuntu-latest From 8635bf12cce4b32cff5662da0fc81b1a6092f3d3 Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 21:56:14 +0900 Subject: [PATCH 07/10] =?UTF-8?q?fix:=20=EC=82=AC=EC=9A=A9=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20mustache=20=EC=84=A4=EC=B9=98?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index a97d719..6800a34 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - name: Install mustache - run: sudo apt-get update && sudo apt-get install -y ruby && gem install mustache - name: creates output run: sh ./build.sh - name: Pushes to another repository From f8304d1fd416c1ab9be734e6042401d795f274ab Mon Sep 17 00:00:00 2001 From: odukong Date: Thu, 1 Jan 2026 21:57:35 +0900 Subject: [PATCH 08/10] =?UTF-8?q?refactor:=20commit-message=EB=A5=BC=20hea?= =?UTF-8?q?d=5Fcommit=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6800a34..808c102 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -21,7 +21,7 @@ jobs: destination-github-username: odukong destination-repository-name: COMFIT-CLIENT user-email: ${{ secrets.EMAIL }} - commit-message: ${{ github.event.commits[0].message }} + commit-message: ${{ github.event.head_commit.message }} target-branch: ${{ github.ref_name }} - name: Test get variable exported by push-to-another-repository run: echo $DESTINATION_CLONED_DIRECTORY From 7a72a4de6f4235c3fbe79c4f328d3e9f39ecc94d Mon Sep 17 00:00:00 2001 From: odukong Date: Fri, 2 Jan 2026 00:10:39 +0900 Subject: [PATCH 09/10] =?UTF-8?q?fix:=20vercel=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EB=B8=8C=EB=9E=9C=EC=B9=98=EC=99=80=20target-branch=20?= =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vercel에서 참조하고 있는 브랜치는 개인레포의 dev브랜치입니다. 하지만 cd.yml에서는 target브랜치인 ${{ github.ref_name }}, 즉 main으로 타깃을 지정하고 있습니다. vercel에서 참조하고 있는 브랜치는 개인레포의 dev이기 때문에, main을 빌드한 결과물인 output 디렉터리 역시 개인 레포의 dev로 push되게 해야하기 때문에 target-branch를 dev로 수정하였습니다. - 추가로, vercel에서 참조 브랜치를 변경하게 되면 새로운 push부터 변경사항이 적용된다고 하여 yml을 수정하였습니다. --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 808c102..c9ebfbd 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -22,6 +22,6 @@ jobs: destination-repository-name: COMFIT-CLIENT user-email: ${{ secrets.EMAIL }} commit-message: ${{ github.event.head_commit.message }} - target-branch: ${{ github.ref_name }} + target-branch: dev - name: Test get variable exported by push-to-another-repository run: echo $DESTINATION_CLONED_DIRECTORY From 6dcc01e53872ac90e5b089fc1b0122b8eb49257b Mon Sep 17 00:00:00 2001 From: odukong Date: Fri, 2 Jan 2026 00:42:36 +0900 Subject: [PATCH 10/10] =?UTF-8?q?fix:=20target=5Fbranch=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vercel 내 tracking branch가 main으로 체크됨으로 기존 타켓브랜치인 github.ref_name으로 변경 --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c9ebfbd..808c102 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -22,6 +22,6 @@ jobs: destination-repository-name: COMFIT-CLIENT user-email: ${{ secrets.EMAIL }} commit-message: ${{ github.event.head_commit.message }} - target-branch: dev + target-branch: ${{ github.ref_name }} - name: Test get variable exported by push-to-another-repository run: echo $DESTINATION_CLONED_DIRECTORY