Thuta Learning
AdvancedWeb Developmentintermediate

Production Deployment to Vercel

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand the Git-based deployment flow
  • Separate preview and production environments
  • Check the domain, logs, and rollback

Deploying isn't just about one command succeeding. You need to know which commit is live, which environment variables it's using, and which version you'd roll back to if something breaks.

The key idea

On Vercel, made by the creators of Next.js, you can import a GitHub, GitLab, or Bitbucket repository. Every pull request gets a preview URL, and you can set the main branch as the production deployment. Add secrets to the dashboard's environment variables and keep preview and production values separate. After deploying, check the domain, HTTPS, logs, function region, database connection, and smoke tests.

Let's try it together

bash
git add .
git commit -m "Build Myanmar Notes"
git push origin main

# Vercel dashboard
# 1. New Project → Import repository
# 2. Environment Variables ထည့်ပါ
# 3. Deploy နှိပ်ပါ
# 4. Production URL တွင် smoke test လုပ်ပါ

How the code works

Push your code to a remote repository, then import it from the Vercel dashboard via New Project. Vercel can detect the framework automatically, but for a monorepo make sure to set the correct root directory. Add environment variables, deploy, and check the production URL.

You should see
You end up with an HTTPS production URL and a preview deployment workflow for every commit.

5-Minute Try-It

List out the variable mapping: test database for the preview environment, production database for the production environment.

Next.js — DeployingNext.js

Easy traps

  • Connecting preview deployments to the production database
  • Assuming you're done once a deploy succeeds, without testing the actual user flow

Exercise

List out the variable mapping: test database for the preview environment, production database for the production environment.

You'll know it worked when: You end up with an HTTPS production URL and a preview deployment workflow for every commit.

Production Deployment to Vercel | Thuta Learning