This document explains how the wedding website deployment uses GitHub-hosted runners (Ubuntu Linux VMs) to build and deploy the full-stack Next.js application to Vercel.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GitHub Repository β
β (Code, Workflows, Database Schema, Next.js App) β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
β Push to main / Manual trigger
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GitHub Actions (CI/CD Pipeline) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β GitHub-Hosted Runner (Ubuntu Linux VM) β β
β β β β
β β 1. Checkout code β β
β β 2. Setup Node.js 20 β β
β β 3. Install dependencies (npm ci) β β
β β 4. Generate Prisma client β β
β β 5. Run tests β β
β β 6. Build Next.js app (Vercel CLI) β β
β β 7. Deploy to Vercel β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
β Deploy artifacts
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Vercel Platform β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Production Environment β β
β β β β
β β β’ Next.js App Running β β
β β β’ SQLite Database (Serverless) β β
β β β’ API Routes (18 endpoints) β β
β β β’ NextAuth Authentication β β
β β β’ Email Service (Gmail SMTP) β β
β β β’ Image Storage (Cloudinary) β β
β β β’ Global CDN β β
β β β’ Automatic SSL β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ
β
β HTTPS
β
βββββββββββββββ
β Users β
β (Browsers) β
βββββββββββββββ
What it is:
- Temporary Ubuntu Linux virtual machines
- Provided free by GitHub
- Runs during GitHub Actions workflows
- Automatically provisioned and destroyed
What it does:
- β Checks out code from repository
- β Installs Node.js 20 and dependencies
- β Generates Prisma database client
- β Runs test suite
- β Builds Next.js application
- β Deploys to Vercel using Vercel CLI
Duration: 2-4 minutes per deployment
Cost: FREE (included with GitHub)
What it is:
- Serverless hosting platform optimized for Next.js
- Global CDN (Content Delivery Network)
- Automatic SSL certificates
- Edge network for fast response times
What it runs:
- β Next.js application (all 34 routes)
- β API routes (18 endpoints for forms, auth, data)
- β SQLite database (serverless, persistent)
- β NextAuth authentication
- β Email notification service
- β Static assets and images
Duration: Continuous (24/7 uptime)
Cost: FREE tier (no credit card required)
Developer Action:
ββ git push origin main
ββ or: Manual workflow trigger
GitHub Actions:
ββ Workflow triggered (.github/workflows/deploy-vercel.yml)
ββ Spin up Ubuntu runner
ββ Install dependencies
ββ Build application
ββ Run tests (optional)
ββ Deploy to Vercel
Vercel:
ββ Receive deployment
ββ Activate new version
ββ Update DNS
ββ Site live with zero downtime
ββ Old version automatically cleaned up
Result:
ββ Live site at https://your-project.vercel.app
Advantages:
- β Free compute for building
- β Consistent Ubuntu environment
- β Integrated with GitHub repository
- β Automatic on every push
- β Can run tests before deploy
- β Build logs in GitHub Actions
Role:
- CI/CD automation
- Quality assurance (testing)
- Build optimization
- Deployment orchestration
Advantages:
- β Free tier (no credit card)
- β Native Next.js support
- β Serverless functions (API routes)
- β Global CDN (fast worldwide)
- β Automatic SSL certificates
- β Zero-downtime deployments
- β Environment variable management
- β Persistent database storage
Role:
- Production hosting
- Serving web traffic
- Running server-side code
- Database storage
- Email sending
| Component | GitHub Runner | Vercel |
|---|---|---|
| Build Process | β Yes | β No |
| Testing | β Yes | β No |
| Live Website | β No | β Yes |
| API Routes | β No | β Yes |
| Database | β No | β Yes |
| Authentication | β No | β Yes |
| Email Sending | β No | β Yes |
| Static Assets | β No | β Yes |
| Duration | 2-4 minutes | 24/7 |
| Cost | Free | Free |
# 1. Make changes to code
git add .
git commit -m "Update feature"
git push origin main
# 2. GitHub Actions automatically:
# - Builds on Ubuntu runner
# - Runs tests
# - Deploys to Vercel
# - Site updated in 3 minutes# Go to GitHub Actions tab
# Select: "Deploy Full-Stack App to Vercel"
# Click: "Run workflow"
# Select: branch (main)
# Click: "Run workflow"Production secrets stored securely in Vercel:
DATABASE_URL- SQLite database pathNEXTAUTH_SECRET- Authentication secretNEXTAUTH_URL- Production URLADMIN_EMAIL- Admin login emailADMIN_PASSWORD- Admin login passwordGMAIL_USER- Email service usernameGMAIL_APP_PASSWORD- Email service passwordCLOUDINARY_*- Image upload credentials
Deployment credentials stored in GitHub Secrets:
VERCEL_TOKEN- Vercel CLI authenticationVERCEL_ORG_ID- Vercel organization IDVERCEL_PROJECT_ID- Vercel project ID
- Low Traffic (< 100 visits/day): β Free tier sufficient
- Medium Traffic (100-10,000 visits/day): β Free tier works
- High Traffic (> 10,000 visits/day): May need Vercel Pro ($20/mo)
-
SQLite (Current):
- β Good for < 1000 concurrent users
- β Simple and fast
- β No extra configuration
-
Upgrade Path (if needed):
- PostgreSQL (Vercel Postgres)
- MySQL (PlanetScale)
- MongoDB (MongoDB Atlas)
# Code updates: Just push to GitHub
git push origin main
# Automatic rebuild and deploy
# Dependency updates:
npm update
git push origin main
# Automatic rebuild and deploy
# Database schema changes:
npx prisma migrate dev
git push origin main
# Automatic rebuild and deploy-
Vercel Dashboard: https://vercel.com/dashboard
- View deployment logs
- Monitor performance
- Check error rates
- Analyze traffic
-
GitHub Actions: Actions tab in repository
- Build status
- Test results
- Deployment history
- β GitHub Actions: 2,000 minutes/month free
- β Each deployment: ~3 minutes
- β Capacity: ~650 deployments/month
- β Bandwidth: 100 GB/month
- β Serverless execution: 100 GB-hours
- β Deployments: Unlimited
- β Team members: 1
- β Custom domains: β
- β SSL: β (automatic)
$0.00 (Everything free)
| Feature | GitHub Pages | This Solution |
|---|---|---|
| Database | β | β SQLite |
| API Routes | β | β 18 routes |
| Authentication | β | β NextAuth |
| Admin Panel | β | β Full dashboard |
| Forms | Limited | β Full featured |
| Build | GitHub Actions | GitHub Actions |
| Cost | Free | Free |
| Feature | VPS | This Solution |
|---|---|---|
| Setup Time | Hours | 12 minutes |
| Maintenance | Manual | Automatic |
| SSL | Manual | Automatic |
| CDN | Extra cost | Included |
| Scaling | Manual | Automatic |
| Cost | $5-50/month | Free |
| Build | Self-managed | GitHub Actions |
- β Isolated VM per workflow
- β Clean environment every time
- β No persistent data
- β Secrets encrypted
- β Automatic SSL/TLS
- β DDoS protection
- β Environment variables encrypted
- β Secure database storage
- β Regular security updates
- Check workflow logs in Actions tab
- Review error messages
- Verify GitHub Secrets are set
- Check Vercel dashboard logs
- Review function logs
- Verify environment variables
- Check database connections
This architecture provides:
β Free Hosting - No costs for typical wedding website β Full-Stack - Database, API routes, authentication β Automatic Deployment - Push code, site updates β GitHub Runners - Ubuntu Linux VMs for building β Production Ready - SSL, CDN, global performance β Simple Maintenance - No server management β Scalable - Handles traffic spikes automatically
Result: Professional wedding website with all features working, deployed in 12 minutes, maintained via Git.
Build Platform: GitHub Actions (Ubuntu runners) Hosting Platform: Vercel (Serverless) Database: SQLite (Serverless) Cost: $0/month Setup Time: 12 minutes Status: β Production Ready