| μΌ | μ | ν | μ | λͺ© | κΈ | ν |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
- μ½μ½μν‘ ν΄λ‘ μ½λ©
- jest
- HttpOnly Cookie
- HTML
- HttyOnly Cookie
- λ Έλ§λ μ½λ
- μνμ½λ©
- cookie 보μ
- cookie λΌμ΄λΈλ¬λ¦¬
- μ½λ©μΌκΈ°
- λ Έλ§λμ½λ
- JAVA Script
- CSS
- μ½λ©λ ν
- λ°λλΌ JSλ‘ ν¬λ‘¬ μ± λ§λ€κΈ°
- λ°λλΌ JSλ‘ κ·Έλ¦Όν λ§λ€κΈ°
- νλ‘ νΈμλ
- typescript
- BFFμν€ν μ²
- javascript
- νλ‘μ μν€ν μ²
- JS
- clone coding
- canvas js
- BFF μν€ν μ²
- react
- canvas
- next.js
- canvas image
- tailwindcss
- Today
- Total
Coding Archive
[CI/CD] GitHub Actions + Vercel CI/CD μ€λ₯ ν΄κ²°κΈ° λ³Έλ¬Έ
[CI/CD] GitHub Actions + Vercel CI/CD μ€λ₯ ν΄κ²°κΈ°
μ½λ±μ΄ 2025. 9. 29. 16:25Node.js λ²μ λ¬Έμ λ‘ Vercel λ°°ν¬ μ€ν¨?!?

νμμ κ°μ΄ μ½λλ₯Ό μμ νκ³ λ©μΈ λΈλμΉμ μ»€λ° νΈμνλλ°, λ°°ν¬κ° μ€ν¨νλ€λ μλ¬κ°..π±
κ°μκΈ° μλ° μλ¬κ° λ¨λ©΄μ deployκ° μλλ μ΄μ λ°μ!
μκ² λ¬΄μ¨ λ»μ΄λλ©΄?
- Node.js 18.xλ μ§μ μ’ λ£(EOL) λμ΄μ λ μ΄μ Vercelμμ λΉλν μ μμ΅λλ€.
- ν΄κ²° λ°©λ²μ Node.js 22.xλ‘ μ κ·Έλ μ΄λ νλ κ²λΏμ λλ€.
μμΈμ νμΈν΄λ³΄λ, μ§κΈ νλ‘μ νΈλ Node.js 18 νκ²½μμ λΉλλκ³ μμκ³ , Vercel μ μ± μ 18 λ²μ μ λ μ΄μ μ§μνμ§ μμΌλ―λ‘ λΉλκ° μ€λ¨λ κ²μ΄μμ΅λλ€.
β μμ λ°©λ² (so simple μ£Όμ)
1οΈβ£ Vercel νλ‘μ νΈ μ€μ
- Vercel λμ보λ → Project Settings → Node.js Version: 22.x λ‘ λ³κ²½
π μ΄λ κ² νλ©΄ Vercel μλ²μμ νμ Node.js 22 νκ²½μΌλ‘ λΉλλ©λλ€.
2οΈβ£ GitHub Actions νκ²½λ λ§μΆ°μ£ΌκΈ°
- νμ¬ μν¬νλ‘μ°λ Node.js 18 κ³ μ → Vercelκ³Ό λμΌνκ² 22λ‘ λ³κ²½
- actions/setup-nodeλ₯Ό v4λ‘ μ λ°μ΄νΈνλ©΄ μμ μ±↑
3οΈβ£ package.jsonμ Node λ²μ λͺ μ (μ ν)
{
"engines": {
"node": "22.x"
}
}
π μ΄λ κ² νλ©΄ νμ λ‘컬 νκ²½μμλ Node.js 22 μ¬μ©μ κΆμ₯ν μ μμ΅λλ€.
π κΈ°μ‘΄ CI/CD Workflow μ 리
- Pull Request / Branch Push → CI μ€ν
- Lint / Test / Build κ²μ¦
- Node.js 22 + Yarn νκ²½ μ¬μ©
- Main Branch Push → CD μ€ν
- vercel pull → νκ²½ λ³μ λΆλ¬μ€κΈ°
- vercel build --prod → Actions runnerμμ λΉλ
- vercel deploy --prebuilt --prod → λΉλ κ²°κ³Όλ¬Ό λ°°ν¬
π§ GitHub Actions μμ (Node.js 22 + Yarn μΊμ μΆκ°)
...
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
- run: yarn install --frozen-lockfile
- run: yarn build
...
ci.yml μμ ver.
name: CI
on:
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
env:
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn test
cd.yml κΈ°μ‘΄ ver.
...
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
...
cd.yml μμ ver.
name: CD(Vercel Production Deployment)
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
π λ³κ²½ ν¬μΈνΈ
- actions/checkout → v4
- actions/setup-node → v4
- Node.js 18 → 22
- cache: 'yarn' μΆκ° → μμ‘΄μ± μ€μΉ μλ ↑, λΉλ μλ μ΅μ ν
π‘μ΄μ ν΄κ²°!

μ΄λ² κ²½νμ ν΅ν΄ λ°°μ΄ μ μ Vercelμμ μ§μλλ Node.js λ²μ νμΈμ νμλ€!
λͺ¨μͺΌλ‘ λ³ μΌ μλμ§λ§, CI/CD μ΄λ³΄λ‘μ μ²μ κ²ͺμ μ΄μλΌ κ³΅μ λλ¦¬κ³ μ κΈμ μμ±νμ΅λλ€.
λ€λ₯Έ λΆλ€λ νΉμλ λΉμ·ν μν©μ λ§λμ λ€λ©΄ μ°Έκ³ κ° λκΈΈ λ°λλλ€. π