Module 10 · Lesson 2 of 6
Deploying on Vercel
Connect a repository, use preview and production deployments, add a domain, read build logs and roll back.
9 min
A repository on GitHub is just files. To turn those files into a page a buyer can open at an open house, something has to build the app and serve it on the internet. That job is called hosting, and the act of putting a new version live is a deploy.
Vercel is a hosting service that connects to a GitHub repository and deploys it automatically every time the code changes. It is the host this course uses (valery.ca runs on it), and its free plan is enough to learn on. This lesson covers how a deploy works, preview and production, domains, rollbacks, build logs, the free plan's limits and the main alternatives.
How a deploy works
When you connect a repository, Vercel watches it. Every push to GitHub starts a deploy with three stages:
- Build. Vercel downloads the code, installs what it needs and runs the build command. For a Next.js app this turns source files into optimized pages and server functions.
- Deploy. The built app is copied to Vercel's servers and given its own web address.
- Assign domains. If this is a production deploy, your production web address now points at the new version.
- 1. TriggerAgent pushes a branch to GitHub
- 2. ToolVercel builds the branch
- 3. CheckPreview URL tested on a phone
- 4. HumanReviewer approves the pull request
- 5. ActionMerge into main
- 6. ToolVercel builds a production deploy
- 7. CheckQuick test on the live domain
If the live test fails, Instant Rollback points the domain back to the last good deploy.
Each deploy is kept as its own copy with its own address. That is what makes previews and rollbacks possible: nothing is overwritten.
Preview and production
Vercel has two kinds of deployment you'll use every week.
- Production is the live site. By default, pushing or merging into the production branch (usually
main) creates a production deployment and your domain switches to it. - Preview is everything else. Pushing to any other branch, or opening a pull request, creates a preview deployment with its own generated web address. There is a link that always shows the latest version of a branch, and a link for each individual commit.
One detail surprises people: the very first deployment of a new project is always a production deployment, even if it came from another branch. After that, the normal rules apply.
Previews are where review happens. Send the preview link to the listing agent, the broker of record or a colleague who is good at breaking things. They test the real app, on their own phone, without any risk to the live site. You can also require a Vercel login to view previews (look for Deployment Protection in the project settings), which is sensible when a preview connects to real data.
Use a separate database for previews
Previews use the Preview set of environment variables, so they can point at a test database full of fictional records. Lesson 3 shows how. That way a reviewer testing a form never adds a fake lead to the brokerage's real CRM.
Domains
Every project gets a free address ending in .vercel.app. For anything clients see, use the brokerage's own domain or a subdomain such as openhouse.yourbrokerage.ca.
To add one, open the project in Vercel, go to Settings → Domains, type the domain and click Add. Vercel then shows the exact DNS record to create at the company where you bought the domain (your registrar). Copy it exactly, save, and wait for Vercel to show the domain as valid. That can take minutes or a few hours. If someone else manages the brokerage's website or email, check with them first: changing the wrong DNS record can take down the main site or stop email.
Build logs
When a deploy fails, Vercel shows a red "Error" status. Click the deployment, then open the build log. It reads top to bottom, like a diary of the build. The useful part is usually the first red line, not the last one. Common causes:
- A missing environment variable (the app expected
DATABASE_URLand didn't find it). - A typing mistake in the code that the build checks catch.
- A package that failed to install.
Copy the error lines, without any keys or passwords, and paste them into your coding agent with the words "This Vercel build failed. Explain the cause in plain language and fix it on a branch." Most failures are fixed in one round.
Rollbacks
Sometimes a change builds fine and still breaks something: the form stops saving, a page goes blank on older iPhones. Vercel's Instant Rollback points your domain back to an earlier production deployment in seconds, without rebuilding.
From the project's overview page, click Instant Rollback on the production deployment tile, choose the deployment to go back to, check the details and confirm. As of October 2026:
- On the free Hobby plan you can roll back to the immediately previous production deployment. Pro and Enterprise teams can choose any earlier production deployment.
- A rollback restores the old build exactly as it was. If you changed environment variables since then, the rolled-back version does not pick them up.
- After a rollback, Vercel stops assigning new pushes to your domain automatically, so a half-fixed change can't go live by accident. When the real fix is ready, use Undo Rollback (or promote the fixed deployment) to return to normal.
A rollback does not undo changes to your database. If the bad version saved incorrect data, you still need to fix that separately.
The Hobby plan and its limits
Vercel's Hobby plan is free. As of October 2026 it includes, each month, 100 GB of Fast Data Transfer, 1,000,000 function invocations, 4 hours of Active CPU, up to 100 deployments a day and one hour of runtime logs. If you go over a limit, you may have to wait up to 30 days before that feature works again. Hobby cannot buy extra usage.
The more important limit is in Vercel's fair use guidelines: Hobby is for non-commercial, personal use only. Vercel defines commercial use broadly. It includes a deployment that advertises the sale of a product or service, and any project where a paid employee or consultant writes the code. A brokerage's open-house page, lead form or agent tool is commercial use. So is a project you build for a brokerage as a paid integration partner.
That means:
- Learning, practice and this module's lab with fictional data: Hobby is fine, using a repository in your personal GitHub account. Hobby can't deploy private repositories owned by a GitHub organization.
- Anything a real brokerage uses: Pro or Enterprise. Pro costs US$20 per developer seat per month as of October 2026 (viewer seats are free) and adds team features, longer logs and spend management. Lesson 6 shows how that fits a budget.
Check the current Hobby plan page and fair use guidelines (both in this module's sources) before you start a client project, since plans change.
Alternatives
Vercel is not the only option. Netlify and Cloudflare Pages work the same way: connect a Git repository, get previews per branch and production on the main branch, add a domain. Both offer free plans as of October 2026, each with its own limits and terms. Read the terms for commercial use before you pick a free plan for a brokerage. The skills in this module transfer directly. If you can deploy on one, you can deploy on the others in an afternoon.
In practice
Lakeshore Homes Brokerage, a fictional brokerage in Mississauga, has a listing-alert sign-up page on Vercel Pro. On Thursday their coding agent opens a pull request that adds a neighbourhood map.
The ops lead opens the preview on their phone. The map loads, but the sign-up button is now hidden behind it on small screens. They comment on the pull request, the agent fixes the layout, and the second preview looks right. They merge, the production deploy finishes in about a minute, and they test the live page once more.
On Friday at 4 p.m. a second change goes live: a new "preferred neighbourhood" field. At 6 p.m. an agent reports that sign-ups aren't reaching the CRM. Nobody wants to debug on a Friday night. The ops lead clicks Instant Rollback, picks Thursday's production deployment and confirms. Sign-ups work again within a minute. On Monday the coding agent finds the cause (a renamed field), fixes it on a branch, and the team checks the preview, merges and uses Undo Rollback to promote the fixed deployment. Total downtime: about two hours, and no lost weekend leads.
Common mistakes
- Testing only on the
.vercel.apppreview on a laptop, never on a phone. - Running a brokerage tool on the Hobby plan, which Vercel's terms reserve for non-commercial use.
- Changing DNS records without knowing which ones carry the brokerage's email.
- Rolling back and forgetting to undo the rollback, so the next fix never goes live.
- Pasting a whole build log, keys included, into a chat.
Key takeaways
- Every push creates a deployment; branches get previews and the production branch gets the live site.
- Use previews for every review, on a phone, ideally with a test database.
- Instant Rollback is your undo button for code, not for data.
- Hobby is free but for non-commercial use only; real brokerage work belongs on a paid plan.
- Netlify and Cloudflare Pages follow the same model, so the skills carry over.
Finished reading? Move on when you're ready.