Vercel Deployment
This guide covers deploying CivStart frontends (documentation, frontend app, admin panel) to Vercel.
Documentation Site Deployment
Option 1: Deploy via Vercel Dashboard
-
Import Project
- Go to https://vercel.com/new
- Select "Add New Project"
- Import the CivStart repository
- Select the
apps/docsdirectory as the root
-
Configure Project Settings
Project Name: civstart-docs
Framework Preset: Other
Root Directory: apps/docs
Build Command: pnpm build
Output Directory: build
Install Command: pnpm install --filter=@civstart/docs... -
Deploy
- Click "Deploy"
- Wait for the build to complete
- Note the deployment URL (e.g.,
civstart-docs.vercel.app)
Option 2: Deploy via Vercel CLI
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy from project root
cd /path/to/CivStart
vercel --cwd apps/docs
# Follow the prompts
Cloudflare DNS Configuration
Step 1: Add DNS Record
- Log in to Cloudflare dashboard
- Select your domain:
civstart.ventures - Go to DNS > Records
- Click "Add record"
Configure the CNAME record:
Type: CNAME
Name: docs
Target: cname.vercel-dns.com
Proxy status: Proxied (orange cloud)
TTL: Auto
Step 2: Configure Custom Domain in Vercel
- Go to Vercel project settings
- Navigate to "Domains"
- Click "Add Domain"
- Enter:
docs.civstart.ventures - Vercel will verify the DNS record
- Once verified, SSL will be automatically configured
Step 3: Wait for SSL Provisioning
- SSL certificates are automatically provisioned by Vercel
- Usually takes 30-60 seconds
- You'll see a green checkmark when ready
Continuous Deployment
Automatic Deployments
Vercel automatically deploys when you push to GitHub:
- Production: Pushes to
mainbranch - Preview: Pushes to any branch generates preview URL
Manual Deployments
From the Vercel dashboard:
- Go to your project
- Click "Deployments"
- Click "..." menu on any deployment
- Select "Redeploy"
Deploy via CLI
# Deploy to production
vercel --prod --cwd apps/docs
# Deploy preview
vercel --cwd apps/docs
Build Configuration
The apps/docs/vercel.json file contains:
{
"buildCommand": "pnpm build",
"outputDirectory": "build",
"installCommand": "pnpm install --filter=@civstart/docs...",
"framework": null,
"public": false
}
Troubleshooting
Build Failures
If the build fails:
- Check build logs in Vercel dashboard
- Test build locally:
pnpm --filter=@civstart/docs build - Common issues:
- Broken links - Check
docusaurus.config.ts - Missing dependencies - Check
package.json - Invalid markdown - Check
.mdfiles
- Broken links - Check
DNS Not Resolving
- Wait 5-10 minutes for DNS propagation
- Check DNS with:
dig docs.civstart.ventures
nslookup docs.civstart.ventures - Verify Cloudflare DNS record is correct
- Ensure "Proxied" status is enabled (orange cloud)
SSL Certificate Issues
- Verify domain is added in Vercel
- Check Cloudflare SSL/TLS mode is "Full" or "Full (strict)"
- Wait up to 24 hours for certificate provisioning
- Contact Vercel support if issues persist
Quick Reference
# Local development
pnpm --filter=@civstart/docs dev
# Build locally
pnpm --filter=@civstart/docs build
# Serve built site
pnpm --filter=@civstart/docs serve
# Deploy to production
vercel --prod --cwd apps/docs