C.W.K.
Stream
Lesson 07 of 13 · published

Vercel & Netlify

~9 min · vercel, netlify, preview

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Git-push deploy; CI 는 보완

Vercel 과 Netlify 는 repo 연결하면 모든 push 에 deploy. Deploy 위해 workflow 가 필요 하지 않아. Workflow 가 사주는 거:

  • 그들이 직접 안 돌리는 사전-deploy check (link 체크, image 최적화 audit, 콘텐츠 검증).
  • 수동 gate 가진 workflow 에서 deploy hook 통해 Vercel/Netlify deploy trigger.
  • 플랫폼이 deploy 한 후 preview URL 에 대한 smoke test.
  • Preview URL + check 요약 가진 sticky PR 코멘트.

CI 에서 Vercel CLI deploy

CI 가 명시적으로 deploy 제어 원하면:

vercel deploy --prebuilt --token=$VERCEL_TOKEN --prod

이게 build 를 deploy 와 분리: CI 에서 한 번 build, 그 다음 prebuilt artifact 를 Vercel 로 push.

Code

Preview URL 에 대한 smoke test·yaml
  preview-smoke:
    if: github.event_name == 'pull_request'
    needs: vercel-deploy
    runs-on: ubuntu-latest
    steps:
      - name: Wait for Vercel preview
        uses: patrickedqvist/wait-for-vercel-preview@v1.3.2
        id: preview
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          max_timeout: 300
      - name: Smoke test
        run: |
          curl -fsS "${{ steps.preview.outputs.url }}/api/health"
          curl -fsS "${{ steps.preview.outputs.url }}/" | grep -q '<title>'

External links

Exercise

Vercel 이나 Netlify 로 deploy 하면 매 deploy 후 preview URL 치고 중요 엔드포인트나 페이지 검증하는 smoke-test job 추가. Smoke 가 preview 가 의도 안 한 regression ship 했을 때의 가드레일.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.