Tutorials / Shipping & infrastructure / Redeploy a website
📝 Written ● Beginner Updated 2026-05-13

Redeploy a website

Push code changes to your live site. On modern PaaS, the redeploy is usually git push — the host watches your branch and rebuilds automatically. Here's the redeploy command and time-to-live for each major host.

Vercel — docs ↗

1

If repo is connected: just push.

git push origin main

Vercel detects the push, builds, and deploys.

Or via CLI (vercel CLI ↗):

vercel --prod

Time: 30s–3 min for a typical Next.js / static site.

Netlify — docs ↗

2

Push to the connected branch:

git push origin main

Or CLI:

netlify deploy --prod

Time: 1–3 min.

Cloudflare Pages — docs ↗

3

Push to the connected branch:

git push origin main

Or via Wrangler (Wrangler docs ↗):

npx wrangler pages deploy ./dist --project-name=my-site

Time: 1–2 min.

Render — our tutorial · docs ↗

4

Push to the connected branch:

git push origin main

Or trigger from dashboard: Manual Deploy → Deploy latest commit.

Time: 2–5 min (Render rebuilds the container).

Railway — our tutorial · docs ↗

5

Push to the connected branch:

git push origin main

Or trigger from dashboard: service → Deployments → Redeploy.

Time: 30s–2 min.

Fly.io — our tutorial · docs ↗

6

Fly is CLI-driven (no auto-deploy from git by default):

fly deploy

This rebuilds the image and rolls out new Machines. Time: 1–3 min per region.

GitHub Pages — docs ↗

7

Push to the branch GitHub Pages serves (usually gh-pages or main):

git push origin main

Time: 30s–10 min. GitHub Pages can be slow on busy days.

Self-hosted (Linux VPS)

8

If you're on your own server, see Redeploy a self-hosted server — different workflow (git pull + restart).

Watch the deploy in real time. Each PaaS shows live build logs in the dashboard. For Vercel/Netlify/Cloudflare you also get a per-deploy preview URL while the build runs — useful for testing before the main URL flips over.
If a build fails, your previous deploy stays live. Modern hosts only swap traffic when the new build succeeds. A broken commit won't take your site down — but the dashboard will show "Failed" until you push a fix. Check the build logs first; the error is usually a missing env var or a TypeScript error you ignored locally.

Cache busting

9

The deploy is live, but users with old CSS/JS cached locally won't see changes until their cache expires. Two fixes:

  • Hashed asset filenames (most frameworks do this by default) — main.a1b2c3.js changes per build; browsers fetch the new one.
  • CDN purge — if your host is behind Cloudflare, the static asset cache may need an explicit purge. Cloudflare dashboard → Caching → Purge.

What's next