- GitHub account
- Vercel account (sign up at vercel.com with GitHub)
- Your portfolio code pushed to GitHub
git add .
git commit -m "Prepare for Vercel deployment"
git push origin main- Go to vercel.com
- Click "Add New Project"
- Import your GitHub repository (
personal-portfolio) - Vercel will auto-detect Vite settings:
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
- Add Environment Variables (if using GitHub token):
- Click "Environment Variables"
- Add:
VITE_GITHUB_TOKEN=your_github_token_here
- Click "Deploy"
# Install Vercel CLI globally
npm install -g vercel
# Login to Vercel
vercel login
# Deploy (run from project root)
vercel
# Follow the prompts:
# - Set up and deploy? Yes
# - Which scope? Your account
# - Link to existing project? No
# - Project name? portfolio (or your choice)
# - Directory? ./ (current directory)
# - Override settings? No
# For production deployment
vercel --prodIf you're using the GitHub token for higher API rate limits:
- In Vercel Dashboard → Your Project → Settings → Environment Variables
- Add:
- Name:
VITE_GITHUB_TOKEN - Value: Your GitHub personal access token
- Environment: Production, Preview, Development (select all)
- Name:
- Redeploy for changes to take effect
- Go to Project Settings → Domains
- Add your custom domain
- Follow DNS configuration instructions
- Vercel will auto-provision SSL certificate
Once connected to GitHub:
- Every push to
main→ Production deployment - Every pull request → Preview deployment
- Automatic builds on code changes
The vercel.json file in your project root configures:
- Build command
- Output directory
- Dev command
- Install command
✅ Check all pages load correctly ✅ Verify GitHub stats are fetching ✅ Test contact form (EmailJS) ✅ Check all project images display ✅ Test responsive design on mobile ✅ Verify all links work (GitHub, LinkedIn, etc.) ✅ Check Open Graph meta tags for social sharing
- Check
package.jsonfor correct scripts - Verify all dependencies are in
package.json - Check build logs in Vercel dashboard
- Ensure they're prefixed with
VITE_ - Redeploy after adding variables
- Check they're set for correct environment
- Ensure images are in
publicfolder - Use absolute paths starting with
/ - Check file names match exactly (case-sensitive)
- Vercel handles this automatically for SPAs
- No additional configuration needed for React Router
# Check deployment status
vercel ls
# View deployment logs
vercel logs
# Remove deployment
vercel remove [deployment-url]
# Open project in browser
vercel openAfter deployment, you'll get:
- Production:
https://your-project.vercel.app - Custom Domain:
https://yourdomain.com(if configured) - Preview: Unique URL for each PR/branch
Vercel automatically provides:
- ✅ Global CDN
- ✅ Automatic HTTPS
- ✅ Image optimization
- ✅ Edge caching
- ✅ Gzip compression
- ✅ HTTP/2 support