Next.js Deploy to Vercel
Vercel hosts Next.js apps. You push the code to Git, and Vercel builds it for you.
Push the code first
Vercel reads the code from Git. Push the main branch, then import the repo.
git push origin mainThe status check on this machine
The check shows the truth here. The tool is not connected, so no deploy ran.
vercel statusExample
vercel statusKey points
- Push the app to a Git repo. Vercel reads the code from Git.
- Import the repo in the Vercel dashboard. Vercel runs the build for you.
- Vercel gives the app a live address. Every push after that makes a preview build.
- The env vars go in the Vercel dashboard. They do not go in the repo.
- This step was not run live here. The Vercel tool on this machine is a server-only variant, and it reports not connected.
- No live address is claimed in this lesson. The steps above are the deploy, stated plainly.
In this example, the status check prints one line of JSON. It says the tool is not connected. No deploy ran on this machine, and no live address exists to show. The lesson teaches the deploy steps: push to Git, import the repo, and let Vercel build it. The steps are stated, not run. A live address needs a connected Vercel account.
Note
Never put a secret in the repo. The dashboard holds the secrets.
Try it Yourself
Edit the code, then press Run.
Running is simulated · TypeScript Playground
Exercise
Where do the env vars go when you deploy?