Deployment
Deployment
Section titled “Deployment”Introduction
Section titled “Introduction”Your portfolio is ready — now it’s time to put it on the internet. Vercel is the simplest deployment option for Next.js and offers a generous free tier perfect for portfolio sites.
Deploying to Vercel
Section titled “Deploying to Vercel”Option 1: Vercel CLI (Quickest)
Section titled “Option 1: Vercel CLI (Quickest)”# Install Vercel CLInpm install -g vercel
# Deploy from your project foldervercel
# Follow the prompts to link your project# Deploy to production when readyvercel --prodOption 2: GitHub Integration (Recommended)
Section titled “Option 2: GitHub Integration (Recommended)”- Push your code to a GitHub repository
- Go to vercel.com and sign up with GitHub
- Click Add New → Project
- Import your portfolio repository
- Vercel auto-detects Next.js — click Deploy
- Every push to
mainautomatically deploys
Environment Variables
Section titled “Environment Variables”If you use any API keys (e.g., for email), add them in Vercel:
Dashboard → Project → Settings → Environment VariablesAdd variables like RESEND_API_KEY or CONTACT_EMAIL here — never commit them to your repo.
Custom Domain
Section titled “Custom Domain”- Buy a domain (Namecheap, Google Domains, or Cloudflare)
- In Vercel: Project → Settings → Domains → Add
- Update your domain’s DNS settings:
- Add a CNAME record pointing
wwwtocname.vercel-dns.com - Add a redirect from
yourdomain.comtowww.yourdomain.com
- Add a CNAME record pointing
Vercel handles SSL certificates automatically.
Post-Deployment Checklist
Section titled “Post-Deployment Checklist”- All pages load without errors
- Images display correctly
- Contact form works and delivers messages
- Mobile layout looks good
- Custom domain redirects to HTTPS
- SEO metadata is set (title, description)
- Analytics is working (if configured)
- Social preview cards render correctly
Common Mistakes
Section titled “Common Mistakes”- Committing
.env.local— Add it to.gitignore - Forgetting
not-found.tsx— Users who visit broken links see a generic error - Not testing the build locally — Run
npm run buildbefore deploying - Hardcoding URLs — Use relative paths or environment variables
Summary
Section titled “Summary”Deploy to Vercel via GitHub integration for automatic deployments. Add a custom domain for a professional touch. Always test your build locally before deploying.