Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a04f571
#144 build(fe): netlify nextjs plugin 설치 및 설정
KimKyuHoi Feb 6, 2025
1f4dd13
#144 ci(fe): fe-netlify deploy 스크립트 작성
KimKyuHoi Feb 6, 2025
9765a5f
#144 ci(fe): 경로 설정 및 테스트
KimKyuHoi Feb 6, 2025
220f8c9
#144 ci(fe): 경로 테스트
KimKyuHoi Feb 6, 2025
f87fd76
#144 ci(fe): 경로 수정
KimKyuHoi Feb 6, 2025
20bcd88
#144 ci(fe): 파일 경로 수정
KimKyuHoi Feb 6, 2025
d18dfad
#144 ci(fe): 파일 수정
KimKyuHoi Feb 6, 2025
3e35d4d
#144 fix(fe): netlify 배포 수정
KimKyuHoi Feb 6, 2025
1f37647
#144 fix(fe): toml파일 경로 수정
KimKyuHoi Feb 6, 2025
9773e47
#144 fix(fe): 배포 Preview url 달기
KimKyuHoi Feb 6, 2025
02cdb59
#144 fix(fe): 배포 경로 수정
KimKyuHoi Feb 6, 2025
8288d05
#144 fix(fe): 권한 추가
KimKyuHoi Feb 6, 2025
b462ac6
#144 fix(fe): 권한 추가
KimKyuHoi Feb 6, 2025
1242145
#144 fix(fe): 권한추가 테스트
KimKyuHoi Feb 6, 2025
d9b9b10
#144 fix(fe): 권한 테스트
KimKyuHoi Feb 6, 2025
adb0fae
#144 fix(fe): 권한 변경
KimKyuHoi Feb 6, 2025
c1ad615
#144 fix(fe): 권한변경
KimKyuHoi Feb 6, 2025
1d8133b
#144 fix(fe): Personal auth token 설정
KimKyuHoi Feb 6, 2025
397d79d
#144 fix(fe): cd 경로 수정
KimKyuHoi Feb 6, 2025
4770b0b
#144 fix(fe): cd 경로 수정
KimKyuHoi Feb 6, 2025
3c95b11
#144 fix(fe): cd 경로 수정
KimKyuHoi Feb 6, 2025
48f59e1
#144 fix(fe): next 세부설정
KimKyuHoi Feb 7, 2025
5abedab
#144 fix(fe): cd 파일 경로 변경
KimKyuHoi Feb 7, 2025
5eadfbf
#144 fix(fe): standalone 모드 사용
KimKyuHoi Feb 7, 2025
ee10dd0
#144 fix(fe): standalone 모드 설정
KimKyuHoi Feb 7, 2025
a3cc621
#144 fix(fe): env 환경변수 추가
KimKyuHoi Feb 7, 2025
d7b0619
#144 build(fe): cd 디버깅 테스트
KimKyuHoi Feb 7, 2025
ee414ac
#144 build(fe): 파일 위치 변경
KimKyuHoi Feb 8, 2025
9b09046
#144 fix(fe): 경로 수정
KimKyuHoi Feb 8, 2025
b43a767
#144 fix(fe): netlify 수정
KimKyuHoi Feb 8, 2025
dca741e
#144 fix(fe): cd 파일 수정
KimKyuHoi Feb 8, 2025
c026538
#144 fix(fe): 파일 수정
KimKyuHoi Feb 8, 2025
3f1570d
#144 fix(fe): 디버깅하기
KimKyuHoi Feb 8, 2025
9092bcd
#144 fix(fe): netlify경로 수정
KimKyuHoi Feb 8, 2025
ad0b215
#144 fix(fe): 경로 수정 및 테스트 배포
KimKyuHoi Feb 9, 2025
bf3555d
#144 build(fe): cd install명령어 수정
KimKyuHoi Feb 9, 2025
dcf5f08
#144 fix(fe): 파일 위치 수정
KimKyuHoi Feb 9, 2025
4de6a8d
#144 feat(fe): 서버리스 함수추가
KimKyuHoi Feb 9, 2025
6b86d93
#144 feat(fe): 서버리스 함수 폴더 생성 스크립트 추가
KimKyuHoi Feb 9, 2025
b3cd3ae
#144 fix(fe): 파일 수정
KimKyuHoi Feb 9, 2025
f505202
#144 fix(fe): 파일수정
KimKyuHoi Feb 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/fe-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: FRONTEND-CD

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- dev
- main
paths:
- 'src/frontend/**'
- '.github/workflows/fe-cd.yml'

permissions:
contents: read
deployments: write
pull-requests: write
statuses: write
checks: 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: 20

- uses: pnpm/action-setup@v4
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/cache
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Prepare Netlify functions
run: |
cd src/frontend/apps/web
mkdir -p netlify/functions

- name: Install dependencies
run: |
cd src/frontend
pnpm install --no-frozen-lockfile
pnpm add turbo --save-dev -w

- name: Build
run: |
cd src/frontend
pnpm turbo build
echo "🔍 Checking build output..."
ls -la apps/web/.next

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: 'src/frontend/apps/web/.next'
functions-dir: 'src/frontend/apps/web/netlify/functions'
production-branch: '["main", "dev"]'
github-token: ${{ secrets.PAT_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
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:
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
2 changes: 1 addition & 1 deletion .github/workflows/fe-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ out/
build
dist

# Next.js telemetry
.netlify

# Debug
npm-debug.log*

Expand Down
1 change: 1 addition & 0 deletions src/frontend/apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone', // standalone 출력 추가
transpilePackages: ['@workspace/ui'],
};

Expand Down
13 changes: 13 additions & 0 deletions src/frontend/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[build]
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"

2 changes: 2 additions & 0 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions src/frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions src/frontend/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"ui": "tui",
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
"outputs": [".next/**"]
"outputs": [".next/**", "!.next/cache/**", "dist/**", "build/**"],
"dependsOn": ["^build"]
},
"build-storybook": {
"dependsOn": ["^build-storybook"],
Expand Down Expand Up @@ -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
}
Expand Down
Loading