Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 18 additions & 14 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- "Test/**"
- "Refactor/**"

# (์„ ํƒ) Actions ํƒญ์—์„œ ์ˆ˜๋™ ์‹คํ–‰ ๋ฒ„ํŠผ
# Actions ํƒญ์—์„œ ์ˆ˜๋™ ์‹คํ–‰
workflow_dispatch: {}

concurrency:
Expand All @@ -35,6 +35,7 @@ jobs:
name: Style & Lint
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -65,16 +66,17 @@ jobs:
run: pnpm run --if-present lint

test:
name: Test
runs-on: ubuntu-latest
needs: lint
timeout-minutes: 15

# โœ… ํ…Œ์ŠคํŠธ ๋‹จ๊ณ„์—์„œ๋„ env ํ•„์š”ํ•œ ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์•„์„œ ๊ฐ™์ด ์ฃผ์ž…
# โœ… ์ „๋ถ€ secrets๋กœ ํ†ต์ผ (๋„ˆ๋Š” ์ง€๊ธˆ Secrets์— ๋„ฃ์–ด๋†จ์œผ๋‹ˆ๊นŒ ์ด๊ฒŒ ์ •๋‹ต)
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_API_TIMEOUT: ${{ secrets.NEXT_PUBLIC_API_TIMEOUT }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
NEXT_PUBLIC_API_TIMEOUT: "10000"

steps:
- uses: actions/checkout@v4
Expand All @@ -99,19 +101,27 @@ jobs:

- run: pnpm install --frozen-lockfile

- name: Check env exists
run: |
test -n "$NEXT_PUBLIC_SUPABASE_URL" || (echo "NEXT_PUBLIC_SUPABASE_URL missing" && exit 1)
test -n "$NEXT_PUBLIC_SUPABASE_ANON_KEY" || (echo "NEXT_PUBLIC_SUPABASE_ANON_KEY missing" && exit 1)
test -n "$NEXT_PUBLIC_API_TIMEOUT" || (echo "NEXT_PUBLIC_API_TIMEOUT missing" && exit 1)
test -n "$SUPABASE_SERVICE_ROLE_KEY" || (echo "SUPABASE_SERVICE_ROLE_KEY missing" && exit 1)

- run: pnpm run --if-present test -- --ci

build:
name: Build
runs-on: ubuntu-latest
needs: test
timeout-minutes: 15

# โœ… ์—ฌ๊ธฐ์„œ supabaseUrl required ํ„ฐ์ง€๋˜ ์›์ธ ํ•ด๊ฒฐ: build์— env ์ฃผ์ž…
# โœ… build๋„ ๋™์ผํ•˜๊ฒŒ secrets ์ฃผ์ž…
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_API_TIMEOUT: ${{ secrets.NEXT_PUBLIC_API_TIMEOUT }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
NEXT_PUBLIC_API_TIMEOUT: "10000"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -140,14 +150,8 @@ jobs:
run: |
test -n "$NEXT_PUBLIC_SUPABASE_URL" || (echo "NEXT_PUBLIC_SUPABASE_URL missing" && exit 1)
test -n "$NEXT_PUBLIC_SUPABASE_ANON_KEY" || (echo "NEXT_PUBLIC_SUPABASE_ANON_KEY missing" && exit 1)
test -n "$NEXT_PUBLIC_API_TIMEOUT" || (echo "NEXT_PUBLIC_API_TIMEOUT missing" && exit 1)
test -n "$SUPABASE_SERVICE_ROLE_KEY" || (echo "SUPABASE_SERVICE_ROLE_KEY missing" && exit 1)

# (์„ ํƒ) Next.js ๋นŒ๋“œ ์บ์‹œ
# - uses: actions/cache@v4
# with:
# path: |
# .next/cache
# key: ${{ runner.os }}-next-${{ hashFiles('pnpm-lock.yaml', 'next.config.*', '**/*.{ts,tsx,js,jsx,css,scss,md,mdx}') }}
# restore-keys: ${{ runner.os }}-next-

- run: pnpm run build
- name: Build
run: pnpm run build
Loading