My side project's deployment pipeline is 8 lines of JSON.
No CI config. No build scripts. No YAML.
I connected the GitHub repo to Vercel, added one vercel.json, and now pushing to git is the deploy.
━━━━━━━━━━━━━━━━━━━━
Some things to keep in mind:
➤ You only get 100 deployments a day
➤ Each deployment gets it's own URL
➤ The PROD URL is an alias that points to the URL of the latest PROD deployment.
➤ Easy rollback. A rollback doesn't rebuild or redeploy anything. It just repoints the domain to a previous deployment at the routing layer. Takes seconds.
➤ Vercel offers 2 envs for deployment: Preview & Production
━━━━━━━━━━━━━━━━━━━━
How to deploy?
CLI version:
➤ vercel (deploys to preview env)
➤ vercel --prod (do I need to explain?)
━━━━━━━━━━━━━━━━━━━━
Git push version:
➤ git push to master or main → deploys to Vercel Production env
➤ git push to any feature branch → deploys to Vercel Preview env
━━━━━━━━━━━━━━━━━━━━
But since both count towards your daily 100 deployment quota, I have personally disabled deploying to preview env via git push to feature branch,
➤ I deploy to preview branch via "vercel" cli command
OR
➤ deploy to Production using "git push origin main" or "vercel --prod"
To do that include a small 【vercel.json】script that disables deployment for git push to feature branch, If you need the script, comment or DM me !
#github #vercel #cicd #deployment
linkedin.com
I connected the GitHub repo to Vercel, added one vercel.json, and now pushing to git is the deploy.
Some things to keep in mind
➤ You only get 100 deployments a day
➤ Each deployment gets its own URL
➤ The PROD URL is an alias that points to the URL of the latest PROD deployment.
➤ Easy rollback. A rollback doesn't rebuild or redeploy anything. It just repoints the domain to the URL of the previous deployment at the routing layer. Takes seconds.
➤ Vercel offers 2 envs for deployment:
Preview
Production
How to deploy?
CLI version
vercel
Deploys to the Preview env.
vercel--prod
Do I need to explain?
Git push version
git push to master or main
↓
Vercel Production env
git push to any feature branch
↓
Vercel Preview env
But since both count towards your daily 100 deployment quota...
I have personally disabled deploying to the Preview env via git push to feature branch.
Instead:
➤ I deploy to Preview via the vercel CLI command.
vercel
OR
➤ Deploy to Production using:
gitpushoriginmain
or:
vercel--prod
How?
Include a small vercel.json configuration that disables deployment for git push to feature branch.
If you need the vercel.json configuration, comment or DM me!