Connect GitHub with Vercel in 11 easy steps—create your repo, commit changes, import your project, set environment variables, and enable seamless auto-deployments.
Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
Step 1: Create and Prepare Your GitHub Repository
First, sign up for a free GitHub account if you don’t have one already by visiting https://github.com/join. Then create a new repository.
my-vercel-app
).After creation, clone it locally:
git clone https://github.com/YOUR\_USERNAME/my-vercel-app.git
cd my-vercel-app
Step 2: Add Your Project Code and Commit Changes
Inside the cloned directory, add your application files. For example, a simple Next.js app:
// Install Next.js (run once)
npx create-next-app@latest .
// Or manually add your files:
// pages/index.js, package.json, etc.
Once your code is in place, commit and push:
git add .
git commit -m "Initial project setup"
git push origin main
Step 3: Sign Up for a Vercel Account
Head to https://vercel.com/signup and sign up using your GitHub account for seamless integration.
Step 4: Import Your GitHub Repository into Vercel
Once logged into Vercel:
my-vercel-app
in the list of repositories.
Step 5: Configure Build and Output Settings
On the import screen, Vercel auto-detects framework settings for Next.js, React, etc. Verify or adjust:
npm run build
or next build
.Click “Deploy” when ready.
Step 6: Set Environment Variables (If Needed)
If your app requires secrets (API keys, database URLs), add them now:
NEXT_PUBLIC_API\_URL
).Production
, Preview
, or Development
.
Step 7: Trigger Your First Deployment
After clicking “Deploy” in Step 5, Vercel will:
npm install
).You can monitor build logs in real time on the Vercel dashboard.
Step 8: Review Your Deployment and Production URL
Once deployment completes:
https://my-vercel-app.vercel.app
).
Step 9: Enable Automatic Deployments on GitHub Push
Every push to the main
branch (or your configured branch) now triggers a new deployment:
git checkout -b feature/cool-update
// implement features
git add .
git commit -m "Add cool feature"
git push origin feature/cool-update
Vercel creates a preview deployment for pull requests and merges to main
automatically go live.
Step 10: Add a Custom Domain (Optional)
To map your own domain:
www.example.com
).
Step 11: Monitor, Logs, and Rollbacks
Conclusion
You have now connected GitHub to Vercel, enabling automatic deployments, preview URLs for branches, and easy management of environment variables and domains. Enjoy continuous deployment for your projects!
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.