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 deploys; CI is a complement

Vercel and Netlify both deploy on every push when you connect a repo. You usually don't need a workflow to deploy them. What workflows still buy you:

  • Pre-deploy checks they don't run themselves (link checks, image-optimization audits, content validation).
  • Triggering Vercel/Netlify deploys via deploy hook from a workflow that does manual gating.
  • Smoke tests against the preview URL after the platform deployed.
  • Sticky PR comments with the preview URL + checks summary.

Vercel CLI deploy from CI

If you want CI to control the deploy explicitly:

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

This decouples build from deploy: build once in CI, then push the prebuilt artifact to Vercel.

Code

Smoke test against the preview URL·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

If you deploy via Vercel or Netlify, add a smoke-test job that hits the preview URL after each deploy and verifies a critical endpoint or page. The smoke is your guardrail when the preview ships an unintended regression.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.