From a04f5717f0c5a6482412cd790c32a1970429c5c7 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:37:49 +0900 Subject: [PATCH 01/41] =?UTF-8?q?#144=20build(fe):=20netlify=20nextjs=20pl?= =?UTF-8?q?ugin=20=EC=84=A4=EC=B9=98=20=EB=B0=8F=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netlify.toml | 6 ++++++ src/frontend/package.json | 1 + src/frontend/pnpm-lock.yaml | 10 ++++++++++ 3 files changed, 17 insertions(+) create mode 100644 src/frontend/netlify.toml diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml new file mode 100644 index 00000000..befe686e --- /dev/null +++ b/src/frontend/netlify.toml @@ -0,0 +1,6 @@ +[build] + command = "cd src/frontend && pnpm run turbo build" + publish = "src/frontend/apps/web/.next" + +[[plugins]] + package = "@netlify/plugin-nextjs" \ No newline at end of file diff --git a/src/frontend/package.json b/src/frontend/package.json index 2003a99b..155c1b24 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -12,6 +12,7 @@ "typescript": "turbo run typescript" }, "devDependencies": { + "@netlify/plugin-nextjs": "^5.9.4", "@workspace/eslint-config": "workspace:*", "@workspace/typescript-config": "workspace:*", "danger": "^12.3.3", diff --git a/src/frontend/pnpm-lock.yaml b/src/frontend/pnpm-lock.yaml index 038f459d..c571320a 100644 --- a/src/frontend/pnpm-lock.yaml +++ b/src/frontend/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@netlify/plugin-nextjs': + specifier: ^5.9.4 + version: 5.9.4 '@workspace/eslint-config': specifier: workspace:* version: link:packages/eslint-config @@ -617,6 +620,10 @@ packages: '@types/react': '>=16' react: '>=16' + '@netlify/plugin-nextjs@5.9.4': + resolution: {integrity: sha512-Q9qyhGUxFuM3kuWmoaj4yHPUfHhOsZmwdsQv4kIXkBWVu8FOe0RFHRP0A0EXciSVFGwq+XAo3H5jEtVSANAOWw==} + engines: {node: '>=18.0.0'} + '@next/env@14.2.23': resolution: {integrity: sha512-CysUC9IO+2Bh0omJ3qrb47S8DtsTKbFidGm6ow4gXIG6reZybqxbkH2nhdEm1tC8SmgzDdpq3BIML0PWsmyUYA==} @@ -2856,6 +2863,7 @@ packages: lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} @@ -4538,6 +4546,8 @@ snapshots: '@types/react': 19.0.7 react: 18.3.1 + '@netlify/plugin-nextjs@5.9.4': {} + '@next/env@14.2.23': {} '@next/eslint-plugin-next@15.1.5': From 1f4dd1318b73853369b80d18a6730781faf61d48 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:38:04 +0900 Subject: [PATCH 02/41] =?UTF-8?q?#144=20ci(fe):=20fe-netlify=20deploy=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 107 ++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 .github/workflows/fe-cd.yml diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml new file mode 100644 index 00000000..32015026 --- /dev/null +++ b/.github/workflows/fe-cd.yml @@ -0,0 +1,107 @@ +name: FRONTEND-CI + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - dev + - main + paths: + - 'src/frontend/**' + - '!src/frontend/packages/ui/**' + - '../workflows/fe-ci.yml' + push: + branches: + - fe-feat/cd-deploy + paths: + - '!src/frontend/packages/ui/**' + - 'src/frontend/**' + - '!src/frontend/packages/ui/**' + - '../workflows/fe-ci.yml' + +permissions: + contents: read + deployments: write + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + changes: + if: ${{ github.actor != 'l10nbot' }} + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: | + ~/.pnpm-store + **/node_modules + src/frontend/node_modules + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Cache turbo build + uses: actions/cache@v4 + with: + path: | + src/frontend/.turbo + src/frontend/apps/web/.next + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-turbo- + + - name: Install dependencies + run: | + cd src/frontend + pnpm install --strict-peer-dependencies=false --no-frozen-lockfile + pnpm add turbo --save-dev -w + + - name: Build + run: | + cd src/frontend + pnpm run turbo build + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v2.0 + with: + publish-dir: 'src/frontend/apps/web/.next' + production-branch: develop + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: 'Deploy from GitHub Actions' + enable-pull-request-comment: false + enable-commit-comment: true + overwrites-pull-request-comment: true + netlify-config-path: './netlify.toml' + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + timeout-minutes: 1 + + required: + needs: [changes] + if: always() + runs-on: ubuntu-latest + steps: + - name: fail if conditional jobs failed + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') + run: exit 1 From 9765a5f56762bbb9cd67e131040217ec46b8e7e7 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:39:15 +0900 Subject: [PATCH 03/41] =?UTF-8?q?#144=20ci(fe):=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=B0=8F=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 32015026..945d02b1 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -12,11 +12,9 @@ on: - '../workflows/fe-ci.yml' push: branches: - - fe-feat/cd-deploy + - fe-ci/cd-deploy paths: - - '!src/frontend/packages/ui/**' - 'src/frontend/**' - - '!src/frontend/packages/ui/**' - '../workflows/fe-ci.yml' permissions: From 220f8c992770f75215fb308a95c808e5034f157d Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:40:12 +0900 Subject: [PATCH 04/41] =?UTF-8?q?#144=20ci(fe):=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 945d02b1..7dcf5da7 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -6,16 +6,13 @@ on: branches: - dev - main - paths: - - 'src/frontend/**' - - '!src/frontend/packages/ui/**' - - '../workflows/fe-ci.yml' + # paths: + # - 'src/frontend/**' + # - '!src/frontend/packages/ui/**' + # - '../workflows/fe-ci.yml' push: branches: - fe-ci/cd-deploy - paths: - - 'src/frontend/**' - - '../workflows/fe-ci.yml' permissions: contents: read From f87fd76ff2372eb0f60cfbe64b6fb08bb2d501e5 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:41:23 +0900 Subject: [PATCH 05/41] =?UTF-8?q?#144=20ci(fe):=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 7dcf5da7..7bacea86 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -1,4 +1,4 @@ -name: FRONTEND-CI +name: FRONTEND-CD on: pull_request: @@ -74,7 +74,7 @@ jobs: - name: Build run: | cd src/frontend - pnpm run turbo build + pnpm turbo build - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 From 20bcd888f561dbca46b6ac9d2293bab7ea9642c4 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 13:44:18 +0900 Subject: [PATCH 06/41] =?UTF-8?q?#144=20ci(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 7bacea86..d0397941 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -86,7 +86,7 @@ jobs: enable-pull-request-comment: false enable-commit-comment: true overwrites-pull-request-comment: true - netlify-config-path: './netlify.toml' + netlify-config-path: 'src/frontend/netlify.toml' env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} From d18dfadc38aaf6ffb3ab068dafb9c7c1dd6f6d57 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:00:03 +0900 Subject: [PATCH 07/41] =?UTF-8?q?#144=20ci(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- src/frontend/netlify.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index d0397941..325e59e4 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -40,7 +40,7 @@ jobs: with: node-version: 22 - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@v4 with: version: 8 diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index befe686e..27f8a9d4 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,5 +1,5 @@ [build] - command = "cd src/frontend && pnpm run turbo build" + command = "cd src/frontend && pnpm turbo build" publish = "src/frontend/apps/web/.next" [[plugins]] From 3e35d4da812ff154641f07c28a6414b45e4a8bf4 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:06:51 +0900 Subject: [PATCH 08/41] =?UTF-8?q?#144=20fix(fe):=20netlify=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- src/frontend/apps/web/next.config.mjs | 5 +++++ src/frontend/netlify.toml | 11 +++++++++-- src/frontend/turbo.json | 11 +++++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 325e59e4..25045c7a 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -79,7 +79,7 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' + publish-dir: 'src/frontend/apps/web/.next/standalone' production-branch: develop github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/apps/web/next.config.mjs b/src/frontend/apps/web/next.config.mjs index 698b5d23..9a255626 100644 --- a/src/frontend/apps/web/next.config.mjs +++ b/src/frontend/apps/web/next.config.mjs @@ -1,6 +1,11 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'standalone', transpilePackages: ['@workspace/ui'], + + images: { + unoptimized: true, + }, }; export default nextConfig; diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 27f8a9d4..2f92fe37 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,6 +1,13 @@ [build] command = "cd src/frontend && pnpm turbo build" - publish = "src/frontend/apps/web/.next" + publish = "src/frontend/apps/web/.next/standalone" [[plugins]] - package = "@netlify/plugin-nextjs" \ No newline at end of file + package = "@netlify/plugin-nextjs" + +[build.environment] + NEXT_TELEMETRY_DISABLED = "1" + NODE_VERSION = "22" + +[functions] + node_bundler = "esbuild" \ No newline at end of file diff --git a/src/frontend/turbo.json b/src/frontend/turbo.json index 03609e11..4b3f2e46 100644 --- a/src/frontend/turbo.json +++ b/src/frontend/turbo.json @@ -3,9 +3,8 @@ "ui": "tui", "tasks": { "build": { - "dependsOn": ["^build"], - "inputs": ["$TURBO_DEFAULT$", ".env*"], - "outputs": [".next/**"] + "outputs": [".next/**", "!.next/cache/**", ".next/standalone/**"], + "dependsOn": ["^build"] }, "build-storybook": { "dependsOn": ["^build-storybook"], @@ -39,7 +38,11 @@ }, "typescript": { "dependsOn": ["^typescript"], - "inputs": ["$TURBO_DEFAULT$", "tsconfig.json", "packages/**/tsconfig.json"], + "inputs": [ + "$TURBO_DEFAULT$", + "tsconfig.json", + "packages/**/tsconfig.json" + ], "cache": true, "persistent": false } From 1f376475a4eb1f90690039ac41c9f2715a8aaa64 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:12:07 +0900 Subject: [PATCH 09/41] =?UTF-8?q?#144=20fix(fe):=20toml=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netlify.toml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 2f92fe37..2d425529 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,13 +1,12 @@ [build] - command = "cd src/frontend && pnpm turbo build" - publish = "src/frontend/apps/web/.next/standalone" - + base = "." + command = "pnpm turbo build" + publish = "apps/web/.next/standalone" + ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../backend/" + [[plugins]] package = "@netlify/plugin-nextjs" [build.environment] NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "22" - -[functions] - node_bundler = "esbuild" \ No newline at end of file + NODE_VERSION = "22" \ No newline at end of file From 9773e478cd76c4b9c896a58aafdbc1f244278e5c Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:15:08 +0900 Subject: [PATCH 10/41] =?UTF-8?q?#144=20fix(fe):=20=EB=B0=B0=ED=8F=AC=20Pr?= =?UTF-8?q?eview=20url=20=EB=8B=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 25045c7a..0575e715 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -77,16 +77,20 @@ jobs: pnpm turbo build - name: Deploy to Netlify + id: netlify-deploy uses: nwtgck/actions-netlify@v2.0 with: publish-dir: 'src/frontend/apps/web/.next/standalone' production-branch: develop github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' - enable-pull-request-comment: false + enable-pull-request-comment: true # PR 코멘트 활성화 enable-commit-comment: true + enable-commit-status: true # 커밋 상태 표시 추가 overwrites-pull-request-comment: true + fails-without-credentials: true # 인증 실패시 배포 실패 처리 netlify-config-path: 'src/frontend/netlify.toml' + alias: deploy-preview-${{ github.event.number }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} From 02cdb592a6485f4f77512ff98ddbf53b031b301f Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:53:27 +0900 Subject: [PATCH 11/41] =?UTF-8?q?#144=20fix(fe):=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- src/frontend/apps/web/next.config.mjs | 5 ----- src/frontend/netlify.toml | 12 ++++++++---- src/frontend/turbo.json | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 0575e715..3a5eb731 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -80,7 +80,7 @@ jobs: id: netlify-deploy uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next/standalone' + publish-dir: 'src/frontend/apps/web/.next' production-branch: develop github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/apps/web/next.config.mjs b/src/frontend/apps/web/next.config.mjs index 9a255626..698b5d23 100644 --- a/src/frontend/apps/web/next.config.mjs +++ b/src/frontend/apps/web/next.config.mjs @@ -1,11 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: 'standalone', transpilePackages: ['@workspace/ui'], - - images: { - unoptimized: true, - }, }; export default nextConfig; diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 2d425529..491f391c 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,12 +1,16 @@ [build] - base = "." + base = "src/frontend" command = "pnpm turbo build" - publish = "apps/web/.next/standalone" - ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../backend/" + publish = "apps/web/.next" [[plugins]] package = "@netlify/plugin-nextjs" [build.environment] NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "22" \ No newline at end of file + NODE_VERSION = "22" + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 \ No newline at end of file diff --git a/src/frontend/turbo.json b/src/frontend/turbo.json index 4b3f2e46..9a4aac78 100644 --- a/src/frontend/turbo.json +++ b/src/frontend/turbo.json @@ -3,7 +3,7 @@ "ui": "tui", "tasks": { "build": { - "outputs": [".next/**", "!.next/cache/**", ".next/standalone/**"], + "outputs": [".next/**", "!.next/cache/**", "dist/**", "build/**"], "dependsOn": ["^build"] }, "build-storybook": { From 8288d05015d92057ab707e1eb9d675cafbec0703 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 14:57:22 +0900 Subject: [PATCH 12/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 3a5eb731..08980d5b 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -18,6 +18,8 @@ permissions: contents: read deployments: write pull-requests: write + statuses: write + checks: write concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From b462ac6e9e9fd518cdc2607a74d2cde49fa086a2 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:01:22 +0900 Subject: [PATCH 13/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 08980d5b..04173409 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -79,24 +79,23 @@ jobs: pnpm turbo build - name: Deploy to Netlify - id: netlify-deploy uses: nwtgck/actions-netlify@v2.0 with: publish-dir: 'src/frontend/apps/web/.next' - production-branch: develop + production-branch: '["main", "dev"]' github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' - enable-pull-request-comment: true # PR 코멘트 활성화 + enable-pull-request-comment: true enable-commit-comment: true - enable-commit-status: true # 커밋 상태 표시 추가 + enable-commit-status: true overwrites-pull-request-comment: true - fails-without-credentials: true # 인증 실패시 배포 실패 처리 + fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' - alias: deploy-preview-${{ github.event.number }} + alias: deploy-preview-${{ github.event.number }} # PR 번호를 포함하도록 수정 env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 1 + timeout-minutes: 10 required: needs: [changes] From 1242145de644c5d30a8de92d9ffa311935c1f6b8 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:08:24 +0900 Subject: [PATCH 14/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 04173409..1a409d78 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -13,6 +13,7 @@ on: push: branches: - fe-ci/cd-deploy + - dev permissions: contents: read From d9b9b10b213d2c929d52b598b2a37c24ca44ce6a Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:11:43 +0900 Subject: [PATCH 15/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 1a409d78..04173409 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -13,7 +13,6 @@ on: push: branches: - fe-ci/cd-deploy - - dev permissions: contents: read From adb0fae6f3e376b818a8837e00bc8daed9aec083 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:16:40 +0900 Subject: [PATCH 16/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 04173409..b77cb583 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -85,10 +85,10 @@ jobs: production-branch: '["main", "dev"]' github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' - enable-pull-request-comment: true - enable-commit-comment: true - enable-commit-status: true - overwrites-pull-request-comment: true + enable-pull-request-comment: false # PR 코멘트 비활성화 + enable-commit-comment: false # 커밋 코멘트 비활성화 + enable-commit-status: false # 커밋 상태 비활성화 + overwrites-pull-request-comment: false fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' alias: deploy-preview-${{ github.event.number }} # PR 번호를 포함하도록 수정 From c1ad615787f6c3ede5869dbdc5bd0cdc0fff07d1 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:24:18 +0900 Subject: [PATCH 17/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B6=8C=ED=95=9C?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index b77cb583..04173409 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -85,10 +85,10 @@ jobs: production-branch: '["main", "dev"]' github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' - enable-pull-request-comment: false # PR 코멘트 비활성화 - enable-commit-comment: false # 커밋 코멘트 비활성화 - enable-commit-status: false # 커밋 상태 비활성화 - overwrites-pull-request-comment: false + enable-pull-request-comment: true + enable-commit-comment: true + enable-commit-status: true + overwrites-pull-request-comment: true fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' alias: deploy-preview-${{ github.event.number }} # PR 번호를 포함하도록 수정 From 1d8133b09961cf33497ffb146a54614c364f84a2 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:27:15 +0900 Subject: [PATCH 18/41] =?UTF-8?q?#144=20fix(fe):=20Personal=20auth=20token?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 04173409..89d1328d 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -83,7 +83,7 @@ jobs: with: publish-dir: 'src/frontend/apps/web/.next' production-branch: '["main", "dev"]' - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' enable-pull-request-comment: true enable-commit-comment: true @@ -95,6 +95,7 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + timeout-minutes: 10 required: From 397d79d0a5e4b1b55dd28e7cb4596ce9f98be71b Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:38:26 +0900 Subject: [PATCH 19/41] =?UTF-8?q?#144=20fix(fe):=20cd=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- src/frontend/apps/web/next.config.mjs | 5 +++++ src/frontend/netlify.toml | 7 ++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 89d1328d..7ae6a4c0 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -81,7 +81,7 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' + publish-dir: 'src/frontend/apps/web/.next/standalone' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/apps/web/next.config.mjs b/src/frontend/apps/web/next.config.mjs index 698b5d23..67f9e26d 100644 --- a/src/frontend/apps/web/next.config.mjs +++ b/src/frontend/apps/web/next.config.mjs @@ -1,6 +1,11 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + output: 'standalone', // standalone 출력 추가 transpilePackages: ['@workspace/ui'], + // Netlify에서의 정적 에셋 처리를 위한 설정 + images: { + unoptimized: true, + }, }; export default nextConfig; diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 491f391c..ff2bc750 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,16 +1,17 @@ [build] base = "src/frontend" command = "pnpm turbo build" - publish = "apps/web/.next" + publish = "apps/web/.next/standalone" [[plugins]] package = "@netlify/plugin-nextjs" [build.environment] NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "22" + NODE_VERSION = "20" # 22 대신 20 사용 (안정 버전) +# Next.js 앱을 위한 리다이렉트 규칙 [[redirects]] from = "/*" - to = "/index.html" + to = "/.netlify/functions/server" status = 200 \ No newline at end of file From 4770b0ba4c1ea46bb72e3741dfa1fc7b799f11a2 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:43:22 +0900 Subject: [PATCH 20/41] =?UTF-8?q?#144=20fix(fe):=20cd=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- src/frontend/netlify.toml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 7ae6a4c0..89d1328d 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -81,7 +81,7 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next/standalone' + publish-dir: 'src/frontend/apps/web/.next' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index ff2bc750..ef5c3a63 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,7 +1,8 @@ [build] base = "src/frontend" command = "pnpm turbo build" - publish = "apps/web/.next/standalone" + publish = "apps/web/.next" + functions = "apps/web/.netlify/functions" [[plugins]] package = "@netlify/plugin-nextjs" @@ -14,4 +15,10 @@ [[redirects]] from = "/*" to = "/.netlify/functions/server" - status = 200 \ No newline at end of file + status = 200 + +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-XSS-Protection = "1; mode=block" \ No newline at end of file From 3c95b1166de36cbbf7be4bba10ce0305423eb681 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Thu, 6 Feb 2025 15:58:46 +0900 Subject: [PATCH 21/41] =?UTF-8?q?#144=20fix(fe):=20cd=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 89d1328d..9b74b870 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -78,7 +78,7 @@ jobs: cd src/frontend pnpm turbo build - - name: Deploy to Netlify + - name: Deploy to Netlifys uses: nwtgck/actions-netlify@v2.0 with: publish-dir: 'src/frontend/apps/web/.next' From 48f59e1508abd5e49c7287b9e9eda3150be29ef8 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:11:58 +0900 Subject: [PATCH 22/41] =?UTF-8?q?#144=20fix(fe):=20next=20=EC=84=B8?= =?UTF-8?q?=EB=B6=80=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/apps/web/next.config.mjs | 6 +++--- src/frontend/netlify.toml | 8 ++++---- src/frontend/package.json | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/frontend/apps/web/next.config.mjs b/src/frontend/apps/web/next.config.mjs index 67f9e26d..f7120259 100644 --- a/src/frontend/apps/web/next.config.mjs +++ b/src/frontend/apps/web/next.config.mjs @@ -2,9 +2,9 @@ const nextConfig = { output: 'standalone', // standalone 출력 추가 transpilePackages: ['@workspace/ui'], - // Netlify에서의 정적 에셋 처리를 위한 설정 - images: { - unoptimized: true, + trailingSlash: true, // 경로 문제 해결 (next export 시 필요) + experimental: { + outputStandalone: true, }, }; diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index ef5c3a63..f238162c 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,7 +1,7 @@ [build] base = "src/frontend" - command = "pnpm turbo build" - publish = "apps/web/.next" + command = "pnpm turbo build && pnpm --filter=web next export" + publish = "apps/web/out" functions = "apps/web/.netlify/functions" [[plugins]] @@ -9,12 +9,12 @@ [build.environment] NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "20" # 22 대신 20 사용 (안정 버전) + NODE_VERSION = "22" # 22 대신 20 사용 (안정 버전) # Next.js 앱을 위한 리다이렉트 규칙 [[redirects]] from = "/*" - to = "/.netlify/functions/server" + to = "/index.html" status = 200 [[headers]] diff --git a/src/frontend/package.json b/src/frontend/package.json index 155c1b24..c1567855 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": false, "scripts": { - "build": "turbo build", + "build": "turbo build && pnpm --filter=web next export", "dev": "turbo dev", "lint": "turbo lint", "format": "turbo run format", From 5abedab08c249bf8adf0a63e200fef64a89aba4f Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:17:51 +0900 Subject: [PATCH 23/41] =?UTF-8?q?#144=20fix(fe):=20cd=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 21 +++++++++++---------- src/frontend/netlify.toml | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 9b74b870..7308ea78 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -6,13 +6,9 @@ on: branches: - dev - main - # paths: - # - 'src/frontend/**' - # - '!src/frontend/packages/ui/**' - # - '../workflows/fe-ci.yml' - push: - branches: - - fe-ci/cd-deploy + paths: + - 'src/frontend/**' + - '../workflows/fe-ci.yml' permissions: contents: read @@ -77,11 +73,16 @@ jobs: run: | cd src/frontend pnpm turbo build + pnpm --filter=web next export # next export 실행 추가 + + - name: Debug Build Output + run: | + ls -la src/frontend/apps/web/out # out 폴더가 정상적으로 생성되었는지 확인 - - name: Deploy to Netlifys + - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' + publish-dir: 'src/frontend/apps/web/out' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' @@ -91,7 +92,7 @@ jobs: overwrites-pull-request-comment: true fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' - alias: deploy-preview-${{ github.event.number }} # PR 번호를 포함하도록 수정 + alias: deploy-preview-${{ github.event.number }} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index f238162c..7fef57c7 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -4,6 +4,9 @@ publish = "apps/web/out" functions = "apps/web/.netlify/functions" +[build.environment] + NETLIFY_NEXT_PLUGIN_FORCE_RUN = "true" + [[plugins]] package = "@netlify/plugin-nextjs" From 5eadfbf47f15d85a61bca65ff7d33359dd9749ad Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:26:01 +0900 Subject: [PATCH 24/41] =?UTF-8?q?#144=20fix(fe):=20standalone=20=EB=AA=A8?= =?UTF-8?q?=EB=93=9C=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 12 ++---------- .github/workflows/fe-ci.yml | 2 +- src/frontend/apps/web/next.config.mjs | 4 ---- src/frontend/netlify.toml | 14 +++++--------- src/frontend/package.json | 2 +- 5 files changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 7308ea78..8e049624 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 20 - uses: pnpm/action-setup@v4 with: @@ -73,16 +73,11 @@ jobs: run: | cd src/frontend pnpm turbo build - pnpm --filter=web next export # next export 실행 추가 - - - name: Debug Build Output - run: | - ls -la src/frontend/apps/web/out # out 폴더가 정상적으로 생성되었는지 확인 - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/out' + publish-dir: 'src/frontend/apps/web/.next' # out → .next 변경 (SSR 지원) production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' @@ -93,9 +88,6 @@ jobs: fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' alias: deploy-preview-${{ github.event.number }} - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} timeout-minutes: 10 diff --git a/.github/workflows/fe-ci.yml b/.github/workflows/fe-ci.yml index d1fd41f4..20d548ee 100644 --- a/.github/workflows/fe-ci.yml +++ b/.github/workflows/fe-ci.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 20 - uses: pnpm/action-setup@v3 with: diff --git a/src/frontend/apps/web/next.config.mjs b/src/frontend/apps/web/next.config.mjs index f7120259..c1b72c1c 100644 --- a/src/frontend/apps/web/next.config.mjs +++ b/src/frontend/apps/web/next.config.mjs @@ -2,10 +2,6 @@ const nextConfig = { output: 'standalone', // standalone 출력 추가 transpilePackages: ['@workspace/ui'], - trailingSlash: true, // 경로 문제 해결 (next export 시 필요) - experimental: { - outputStandalone: true, - }, }; export default nextConfig; diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 7fef57c7..c2536cd2 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,27 +1,23 @@ [build] base = "src/frontend" - command = "pnpm turbo build && pnpm --filter=web next export" - publish = "apps/web/out" + command = "pnpm turbo build" + publish = "apps/web/.next" functions = "apps/web/.netlify/functions" -[build.environment] - NETLIFY_NEXT_PLUGIN_FORCE_RUN = "true" - [[plugins]] package = "@netlify/plugin-nextjs" [build.environment] NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "22" # 22 대신 20 사용 (안정 버전) + NODE_VERSION = "20" -# Next.js 앱을 위한 리다이렉트 규칙 [[redirects]] from = "/*" - to = "/index.html" + to = "/index.html" status = 200 [[headers]] for = "/*" [headers.values] X-Frame-Options = "DENY" - X-XSS-Protection = "1; mode=block" \ No newline at end of file + X-XSS-Protection = "1; mode=block" diff --git a/src/frontend/package.json b/src/frontend/package.json index c1567855..155c1b24 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": false, "scripts": { - "build": "turbo build && pnpm --filter=web next export", + "build": "turbo build", "dev": "turbo dev", "lint": "turbo lint", "format": "turbo run format", From ee10dd0908152bc1ff5dea94fc1a83e0010a9e46 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:28:46 +0900 Subject: [PATCH 25/41] =?UTF-8?q?#144=20fix(fe):=20standalone=20=EB=AA=A8?= =?UTF-8?q?=EB=93=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 3 ++- src/frontend/netlify.toml | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 8e049624..8ff81c0b 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -73,11 +73,12 @@ jobs: run: | cd src/frontend pnpm turbo build + ls -la apps/web/.next/standalone - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' # out → .next 변경 (SSR 지원) + publish-dir: 'src/frontend/apps/web/.next/standalone' # out → .next 변경 (SSR 지원) production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index c2536cd2..2e20d98c 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,8 +1,8 @@ [build] base = "src/frontend" command = "pnpm turbo build" - publish = "apps/web/.next" - functions = "apps/web/.netlify/functions" + publish = "apps/web/.next/standalone" + functions = "apps/web/.next/standalone" [[plugins]] package = "@netlify/plugin-nextjs" @@ -13,9 +13,10 @@ [[redirects]] from = "/*" - to = "/index.html" + to = "/.netlify/functions/next" status = 200 + [[headers]] for = "/*" [headers.values] From a3cc6210ba483b09f6a6d45337515af2c905002c Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:31:43 +0900 Subject: [PATCH 26/41] =?UTF-8?q?#144=20fix(fe):=20env=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 8ff81c0b..d364d4c7 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -89,7 +89,10 @@ jobs: fails-without-credentials: true netlify-config-path: 'src/frontend/netlify.toml' alias: deploy-preview-${{ github.event.number }} - + env: + PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} timeout-minutes: 10 required: From d7b0619123f2f149491400526c7cf43786965d61 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Fri, 7 Feb 2025 16:40:27 +0900 Subject: [PATCH 27/41] =?UTF-8?q?#144=20build(fe):=20cd=20=EB=94=94?= =?UTF-8?q?=EB=B2=84=EA=B9=85=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 5 ++++- src/frontend/netlify.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index d364d4c7..f68a2ee6 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -73,7 +73,10 @@ jobs: run: | cd src/frontend pnpm turbo build - ls -la apps/web/.next/standalone + echo "🔍 Checking .next directory..." + ls -la apps/web/.next # .next 디렉토리 내 파일 확인 + echo "🔍 Checking .next/standalone directory..." + ls -la apps/web/.next/standalone || echo "❌ standalone 폴더가 없음" - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 2e20d98c..4042a176 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -2,7 +2,7 @@ base = "src/frontend" command = "pnpm turbo build" publish = "apps/web/.next/standalone" - functions = "apps/web/.next/standalone" + functions = "apps/web/.next/functions" [[plugins]] package = "@netlify/plugin-nextjs" From ee414acccb6e2462277ea44c02dd54ac947e8645 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sat, 8 Feb 2025 14:52:35 +0900 Subject: [PATCH 28/41] =?UTF-8?q?#144=20build(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/{ => apps/web}/netlify.toml | 0 src/frontend/apps/web/package.json | 1 + src/frontend/package.json | 1 - src/frontend/pnpm-lock.yaml | 6 +++--- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/frontend/{ => apps/web}/netlify.toml (100%) diff --git a/src/frontend/netlify.toml b/src/frontend/apps/web/netlify.toml similarity index 100% rename from src/frontend/netlify.toml rename to src/frontend/apps/web/netlify.toml diff --git a/src/frontend/apps/web/package.json b/src/frontend/apps/web/package.json index e5010dec..027463e4 100644 --- a/src/frontend/apps/web/package.json +++ b/src/frontend/apps/web/package.json @@ -21,6 +21,7 @@ "zustand": "^5.0.3" }, "devDependencies": { + "@netlify/plugin-nextjs": "^5.9.4", "@tanstack/react-query-devtools": "^5.64.2", "@types/node": "^22.10.7", "@types/react": "19.0.7", diff --git a/src/frontend/package.json b/src/frontend/package.json index 155c1b24..2003a99b 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -12,7 +12,6 @@ "typescript": "turbo run typescript" }, "devDependencies": { - "@netlify/plugin-nextjs": "^5.9.4", "@workspace/eslint-config": "workspace:*", "@workspace/typescript-config": "workspace:*", "danger": "^12.3.3", diff --git a/src/frontend/pnpm-lock.yaml b/src/frontend/pnpm-lock.yaml index c571320a..ec24c9ea 100644 --- a/src/frontend/pnpm-lock.yaml +++ b/src/frontend/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: devDependencies: - '@netlify/plugin-nextjs': - specifier: ^5.9.4 - version: 5.9.4 '@workspace/eslint-config': specifier: workspace:* version: link:packages/eslint-config @@ -60,6 +57,9 @@ importers: specifier: ^5.0.3 version: 5.0.3(@types/react@19.0.7)(react@18.3.1) devDependencies: + '@netlify/plugin-nextjs': + specifier: ^5.9.4 + version: 5.9.4 '@tanstack/react-query-devtools': specifier: ^5.64.2 version: 5.64.2(@tanstack/react-query@5.64.2(react@18.3.1))(react@18.3.1) From 9b090464c1368bec5f40201877a4dce04cbe13aa Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sat, 8 Feb 2025 14:54:29 +0900 Subject: [PATCH 29/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index f68a2ee6..22a1e7b2 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -90,7 +90,7 @@ jobs: enable-commit-status: true overwrites-pull-request-comment: true fails-without-credentials: true - netlify-config-path: 'src/frontend/netlify.toml' + netlify-config-path: 'src/frontend/apps/web/netlify.toml' alias: deploy-preview-${{ github.event.number }} env: PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin From b43a767690b1c25d72cc70087631f45572839477 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sat, 8 Feb 2025 15:44:49 +0900 Subject: [PATCH 30/41] =?UTF-8?q?#144=20fix(fe):=20netlify=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 20 ++++++++++++++------ src/frontend/.gitignore | 3 +++ src/frontend/apps/web/netlify.toml | 24 ------------------------ src/frontend/apps/web/package.json | 1 - src/frontend/netlify.toml | 15 +++++++++++++++ src/frontend/package.json | 2 ++ src/frontend/pnpm-lock.yaml | 6 +++--- 7 files changed, 37 insertions(+), 34 deletions(-) delete mode 100644 src/frontend/apps/web/netlify.toml create mode 100644 src/frontend/netlify.toml diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 22a1e7b2..943a5499 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -58,7 +58,7 @@ jobs: with: path: | src/frontend/.turbo - src/frontend/apps/web/.next + src/frontend/apps/web/.next/cache key: ${{ runner.os }}-turbo-${{ github.sha }} restore-keys: | ${{ runner.os }}-turbo- @@ -73,15 +73,23 @@ jobs: run: | cd src/frontend pnpm turbo build - echo "🔍 Checking .next directory..." - ls -la apps/web/.next # .next 디렉토리 내 파일 확인 - echo "🔍 Checking .next/standalone directory..." - ls -la apps/web/.next/standalone || echo "❌ standalone 폴더가 없음" + echo "🔍 Checking build output..." + ls -la apps/web/.next + + - name: Prepare for Netlify + run: | + cd src/frontend/apps/web + # standalone 디렉토리의 내용을 .next로 복사 + cp -r .next/standalone/* .next/ + # static 파일들도 복사 + cp -r .next/static .next/standalone/apps/web/.next/ + # public 디렉토리가 있다면 복사 + [ -d "public" ] && cp -r public .next/standalone/apps/web/ || true - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next/standalone' # out → .next 변경 (SSR 지원) + publish-dir: 'src/frontend/apps/web/.next' # standalone이 아닌 전체 .next 디렉토리를 배포 production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/.gitignore b/src/frontend/.gitignore index cb4a7e05..43fd09ac 100644 --- a/src/frontend/.gitignore +++ b/src/frontend/.gitignore @@ -20,6 +20,9 @@ out/ build dist +# Next.js telemetry +.netlify + # Debug npm-debug.log* diff --git a/src/frontend/apps/web/netlify.toml b/src/frontend/apps/web/netlify.toml deleted file mode 100644 index 4042a176..00000000 --- a/src/frontend/apps/web/netlify.toml +++ /dev/null @@ -1,24 +0,0 @@ -[build] - base = "src/frontend" - command = "pnpm turbo build" - publish = "apps/web/.next/standalone" - functions = "apps/web/.next/functions" - -[[plugins]] - package = "@netlify/plugin-nextjs" - -[build.environment] - NEXT_TELEMETRY_DISABLED = "1" - NODE_VERSION = "20" - -[[redirects]] - from = "/*" - to = "/.netlify/functions/next" - status = 200 - - -[[headers]] - for = "/*" - [headers.values] - X-Frame-Options = "DENY" - X-XSS-Protection = "1; mode=block" diff --git a/src/frontend/apps/web/package.json b/src/frontend/apps/web/package.json index 027463e4..e5010dec 100644 --- a/src/frontend/apps/web/package.json +++ b/src/frontend/apps/web/package.json @@ -21,7 +21,6 @@ "zustand": "^5.0.3" }, "devDependencies": { - "@netlify/plugin-nextjs": "^5.9.4", "@tanstack/react-query-devtools": "^5.64.2", "@types/node": "^22.10.7", "@types/react": "19.0.7", diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml new file mode 100644 index 00000000..4602faeb --- /dev/null +++ b/src/frontend/netlify.toml @@ -0,0 +1,15 @@ +[build] + command = "turbo run build" + publish = "apps/web/.next" + ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ./apps/web/" + +[build.environment] + NETLIFY_NEXT_PLUGIN_SKIP = "true" + NODE_VERSION = "20" + NEXT_TELEMETRY_DISABLED = "1" + +[[plugins]] + package = "@netlify/plugin-nextjs" + +[functions] + included_files = ["apps/web/.next/standalone/**"] \ No newline at end of file diff --git a/src/frontend/package.json b/src/frontend/package.json index 2003a99b..cfa33c52 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -4,6 +4,7 @@ "private": false, "scripts": { "build": "turbo build", + "build:web": "turbo run build --filter=web...", "dev": "turbo dev", "lint": "turbo lint", "format": "turbo run format", @@ -12,6 +13,7 @@ "typescript": "turbo run typescript" }, "devDependencies": { + "@netlify/plugin-nextjs": "^5.9.4", "@workspace/eslint-config": "workspace:*", "@workspace/typescript-config": "workspace:*", "danger": "^12.3.3", diff --git a/src/frontend/pnpm-lock.yaml b/src/frontend/pnpm-lock.yaml index ec24c9ea..c571320a 100644 --- a/src/frontend/pnpm-lock.yaml +++ b/src/frontend/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@netlify/plugin-nextjs': + specifier: ^5.9.4 + version: 5.9.4 '@workspace/eslint-config': specifier: workspace:* version: link:packages/eslint-config @@ -57,9 +60,6 @@ importers: specifier: ^5.0.3 version: 5.0.3(@types/react@19.0.7)(react@18.3.1) devDependencies: - '@netlify/plugin-nextjs': - specifier: ^5.9.4 - version: 5.9.4 '@tanstack/react-query-devtools': specifier: ^5.64.2 version: 5.64.2(@tanstack/react-query@5.64.2(react@18.3.1))(react@18.3.1) From dca741e17d21dc34a3ed88542520ccc0a3f55ef1 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sat, 8 Feb 2025 15:50:19 +0900 Subject: [PATCH 31/41] =?UTF-8?q?#144=20fix(fe):=20cd=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 943a5499..56fd8747 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -98,7 +98,7 @@ jobs: enable-commit-status: true overwrites-pull-request-comment: true fails-without-credentials: true - netlify-config-path: 'src/frontend/apps/web/netlify.toml' + netlify-config-path: 'src/frontend/netlify.toml' alias: deploy-preview-${{ github.event.number }} env: PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin From c02653840b348abd717ecff6f47a0a45140e1bf4 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sun, 9 Feb 2025 00:34:23 +0900 Subject: [PATCH 32/41] =?UTF-8?q?#144=20fix(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netlify.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index 4602faeb..d88dc60d 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -4,7 +4,6 @@ ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ./apps/web/" [build.environment] - NETLIFY_NEXT_PLUGIN_SKIP = "true" NODE_VERSION = "20" NEXT_TELEMETRY_DISABLED = "1" From 3f1570df71a5def989a3aa43f820aa62d45861e1 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sun, 9 Feb 2025 00:59:41 +0900 Subject: [PATCH 33/41] =?UTF-8?q?#144=20fix(fe):=20=EB=94=94=EB=B2=84?= =?UTF-8?q?=EA=B9=85=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 56fd8747..40c24f78 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -82,14 +82,14 @@ jobs: # standalone 디렉토리의 내용을 .next로 복사 cp -r .next/standalone/* .next/ # static 파일들도 복사 - cp -r .next/static .next/standalone/apps/web/.next/ + cp -r .next/static/* .next/standalone/apps/web/.next/ # public 디렉토리가 있다면 복사 [ -d "public" ] && cp -r public .next/standalone/apps/web/ || true - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' # standalone이 아닌 전체 .next 디렉토리를 배포 + publish-dir: 'src/frontend/apps/web/.next' # 전체 .next 디렉토리를 배포 production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' From 9092bcd42e781fe3697141d4f9f7fea5c1ee35ed Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Sun, 9 Feb 2025 02:08:01 +0900 Subject: [PATCH 34/41] =?UTF-8?q?#144=20fix(fe):=20netlify=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index d88dc60d..daa311c5 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -1,7 +1,7 @@ [build] - command = "turbo run build" - publish = "apps/web/.next" - ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ./apps/web/" + base = "src/frontend/apps/web" + command = "pnpm build" + publish = ".next" [build.environment] NODE_VERSION = "20" From ad0b21519eb273eb92b1175ca8f0cf76ec232722 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 01:59:30 +0900 Subject: [PATCH 35/41] =?UTF-8?q?#144=20fix(fe):=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 16 +++------------- src/frontend/netlify.toml | 5 ++--- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 40c24f78..8eefb94b 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -8,7 +8,7 @@ on: - main paths: - 'src/frontend/**' - - '../workflows/fe-ci.yml' + - '.github/workflows/fe-cd.yml' permissions: contents: read @@ -66,7 +66,7 @@ jobs: - name: Install dependencies run: | cd src/frontend - pnpm install --strict-peer-dependencies=false --no-frozen-lockfile + pnpm install --frozen-lockfile pnpm add turbo --save-dev -w - name: Build @@ -76,20 +76,10 @@ jobs: echo "🔍 Checking build output..." ls -la apps/web/.next - - name: Prepare for Netlify - run: | - cd src/frontend/apps/web - # standalone 디렉토리의 내용을 .next로 복사 - cp -r .next/standalone/* .next/ - # static 파일들도 복사 - cp -r .next/static/* .next/standalone/apps/web/.next/ - # public 디렉토리가 있다면 복사 - [ -d "public" ] && cp -r public .next/standalone/apps/web/ || true - - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' # 전체 .next 디렉토리를 배포 + publish-dir: 'src/frontend/apps/web/.next' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml index daa311c5..0f0716cb 100644 --- a/src/frontend/netlify.toml +++ b/src/frontend/netlify.toml @@ -2,13 +2,12 @@ base = "src/frontend/apps/web" command = "pnpm build" publish = ".next" + ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../../" [build.environment] NODE_VERSION = "20" NEXT_TELEMETRY_DISABLED = "1" - + [[plugins]] package = "@netlify/plugin-nextjs" -[functions] - included_files = ["apps/web/.next/standalone/**"] \ No newline at end of file From bf3555dc7ce57728292bf679889329db00741f7c Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:00:39 +0900 Subject: [PATCH 36/41] =?UTF-8?q?#144=20build(fe):=20cd=20install=EB=AA=85?= =?UTF-8?q?=EB=A0=B9=EC=96=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 8eefb94b..3cb24b74 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -66,7 +66,7 @@ jobs: - name: Install dependencies run: | cd src/frontend - pnpm install --frozen-lockfile + pnpm install --no-frozen-lockfile pnpm add turbo --save-dev -w - name: Build From dcf5f0800dd3cdd493fea8e88516fcbe2ce2f6d6 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:03:41 +0900 Subject: [PATCH 37/41] =?UTF-8?q?#144=20fix(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 3cb24b74..0f381e4b 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -79,7 +79,7 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web/.next' + publish-dir: 'src/frontend/apps/web' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' From 4de6a8dee01e13e05d2c66330bdd8bbaca440a43 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:13:19 +0900 Subject: [PATCH 38/41] =?UTF-8?q?#144=20feat(fe):=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=20=ED=95=A8=EC=88=98=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 0f381e4b..83f2f012 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -79,7 +79,8 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2.0 with: - publish-dir: 'src/frontend/apps/web' + publish-dir: 'src/frontend/apps/web/.next' + functions-dir: 'src/frontend/apps/web/.netlify/functions-internal' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' From 6b86d93411e301fa32541c5424c113e72fcacc77 Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:16:20 +0900 Subject: [PATCH 39/41] =?UTF-8?q?#144=20feat(fe):=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=20=ED=95=A8=EC=88=98=20=ED=8F=B4=EB=8D=94=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 83f2f012..32a5e92b 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -63,6 +63,11 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- + - name: Prepare Netlify functions + run: | + cd src/frontend/apps/web + mkdir -p .netlify/functions-internal + - name: Install dependencies run: | cd src/frontend From b3cd3ae9fa3433f3a36f8d5f6bd281108bf1856c Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:22:03 +0900 Subject: [PATCH 40/41] =?UTF-8?q?#144=20fix(fe):=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index 32a5e92b..ca209e65 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -66,7 +66,7 @@ jobs: - name: Prepare Netlify functions run: | cd src/frontend/apps/web - mkdir -p .netlify/functions-internal + mkdir -p .netlify/functions - name: Install dependencies run: | @@ -85,7 +85,7 @@ jobs: uses: nwtgck/actions-netlify@v2.0 with: publish-dir: 'src/frontend/apps/web/.next' - functions-dir: 'src/frontend/apps/web/.netlify/functions-internal' + functions-dir: 'src/frontend/apps/web/netlify/functions' production-branch: '["main", "dev"]' github-token: ${{ secrets.PAT_GITHUB_TOKEN }} deploy-message: 'Deploy from GitHub Actions' From f505202b9f401b497318fb813b72133cac70e83f Mon Sep 17 00:00:00 2001 From: KimKyuHoi Date: Mon, 10 Feb 2025 02:24:16 +0900 Subject: [PATCH 41/41] =?UTF-8?q?#144=20fix(fe):=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd.yml b/.github/workflows/fe-cd.yml index ca209e65..93e4aabd 100644 --- a/.github/workflows/fe-cd.yml +++ b/.github/workflows/fe-cd.yml @@ -66,7 +66,7 @@ jobs: - name: Prepare Netlify functions run: | cd src/frontend/apps/web - mkdir -p .netlify/functions + mkdir -p netlify/functions - name: Install dependencies run: |