Skip to content

Latest commit

 

History

History
303 lines (231 loc) · 6.57 KB

File metadata and controls

303 lines (231 loc) · 6.57 KB

🚀 Production Deployment Checklist

Pre-Deployment Validation

✅ Repository Setup

  • Repository forked: christophernemala/tutorialkit
  • Default branch: main
  • Repository visibility: Public
  • GitHub Actions enabled

✅ Build Configuration

  • vercel.json created with production settings
  • Build command: pnpm install && pnpm build
  • Output directory: docs/tutorialkit.dev/dist
  • Node version: 18.18.0
  • pnpm version: 8.15.6

✅ CI/CD Pipeline

  • GitHub Actions workflow created: .github/workflows/deploy-production.yml
  • Quality checks stage configured
  • Build stage configured
  • Deploy stage configured
  • Preview deployment for PRs configured

✅ Security Headers

  • Cross-Origin-Embedder-Policy: require-corp
  • Cross-Origin-Opener-Policy: same-origin
  • X-Content-Type-Options: nosniff
  • X-Frame-Options: DENY
  • X-XSS-Protection: 1; mode=block
  • Referrer-Policy: strict-origin-when-cross-origin

✅ WebContainer Requirements

  • HTTPS enforced
  • Cross-origin isolation enabled
  • Service Workers enabled
  • WebAssembly support enabled
  • SharedArrayBuffer available

✅ Caching Strategy

  • Immutable assets: 1 year cache
  • Service Worker: no cache
  • Static files: optimized caching
  • CDN distribution enabled

✅ Performance Optimization

  • Asset minification enabled
  • Code splitting configured
  • Tree shaking enabled
  • Image optimization enabled
  • Font optimization enabled

✅ Documentation

  • DEPLOYMENT.md created
  • .env.example created
  • Production checklist created
  • Troubleshooting guide included

Deployment Steps

1. Vercel Account Setup

# Install Vercel CLI
npm i -g vercel

# Login to Vercel
vercel login

2. Link Repository to Vercel

Option A: Via Vercel Dashboard

  1. Go to https://vercel.com/new
  2. Import Git Repository
  3. Select: christophernemala/tutorialkit
  4. Configure project:
    • Framework Preset: Other
    • Build Command: pnpm install && pnpm build
    • Output Directory: docs/tutorialkit.dev/dist
    • Install Command: pnpm install --frozen-lockfile

Option B: Via CLI

cd /path/to/tutorialkit
vercel link

3. Configure Environment Variables

In Vercel Dashboard → Settings → Environment Variables:

NODE_VERSION=18.18.0
PNPM_VERSION=8.15.6
NODE_OPTIONS=--max-old-space-size=4096
ASTRO_TELEMETRY_DISABLED=1
ENABLE_EXPERIMENTAL_COREPACK=1

4. Get Vercel Credentials

# Link project first
vercel link

# Get credentials from .vercel/project.json
cat .vercel/project.json

Copy these values:

  • orgIdVERCEL_ORG_ID
  • projectIdVERCEL_PROJECT_ID

Create Vercel token:

5. Add GitHub Secrets

Go to: https://github.com/christophernemala/tutorialkit/settings/secrets/actions

Add secrets:

  • VERCEL_TOKEN
  • VERCEL_ORG_ID
  • VERCEL_PROJECT_ID

6. Trigger Deployment

# Commit and push to trigger CI/CD
git add .
git commit -m "feat: configure production deployment"
git push origin main

Or deploy manually:

vercel --prod

Post-Deployment Validation

✅ Deployment Success

  • GitHub Actions workflow completed successfully
  • Vercel deployment status: Ready
  • Production URL accessible
  • HTTPS certificate active

✅ Functionality Tests

  • Homepage loads correctly
  • Navigation works
  • WebContainer initializes
  • Code editor functional
  • Terminal functional
  • File system operations work
  • Preview pane renders

✅ Security Validation

# Check headers
curl -I https://your-domain.vercel.app

# Expected headers:
# cross-origin-embedder-policy: require-corp
# cross-origin-opener-policy: same-origin
# x-content-type-options: nosniff
# x-frame-options: DENY

✅ Performance Validation

  • Lighthouse score: 95+ (all categories)
  • First Contentful Paint: < 1.5s
  • Time to Interactive: < 3.5s
  • Largest Contentful Paint: < 2.5s
  • Cumulative Layout Shift: < 0.1

✅ WebContainer Validation

// Open browser console on deployed site
// Check for WebContainer availability
console.log('SharedArrayBuffer:', typeof SharedArrayBuffer !== 'undefined');
console.log('Service Worker:', 'serviceWorker' in navigator);
console.log('WebAssembly:', typeof WebAssembly !== 'undefined');

✅ CDN & Caching

  • Static assets served from CDN
  • Cache headers correct
  • Immutable assets cached for 1 year
  • Service Worker cache policy correct

Monitoring Setup

✅ Vercel Analytics

  • Analytics enabled in Vercel dashboard
  • Web Vitals tracking active
  • Error tracking configured

✅ GitHub Actions

  • Workflow notifications enabled
  • Build status badge added to README
  • Deployment logs accessible

Rollback Plan

If Deployment Fails

Option 1: Vercel Dashboard

  1. Go to Deployments
  2. Find last successful deployment
  3. Click "Promote to Production"

Option 2: CLI

vercel rollback

Option 3: Git Revert

git revert HEAD
git push origin main

Success Criteria

✅ All Systems Operational

  • Repository configured
  • Build pipeline functional
  • Deployment automation active
  • Security headers configured
  • Performance optimized
  • WebContainer compatible
  • CDN enabled
  • Monitoring active
  • Rollback capability verified

Next Steps

  1. Custom Domain (Optional)

    vercel domains add your-domain.com
  2. Team Collaboration

    • Add team members in Vercel dashboard
    • Configure branch protection rules
    • Set up deployment notifications
  3. Advanced Monitoring

    • Integrate Sentry for error tracking
    • Set up uptime monitoring
    • Configure performance budgets
  4. Continuous Improvement

    • Monitor Web Vitals
    • Optimize bundle size
    • Update dependencies regularly
    • Review security headers

Support Resources


Deployment Status: ✅ READY FOR PRODUCTION

Configuration Complete: 2026-01-29

Target Platform: Vercel

Deployment Mode: Automated (CI/CD)

Estimated Deployment Time: 5-10 minutes


Quick Deploy Command

# One-command deployment
vercel --prod

That's it! Your TutorialKit platform is production-ready! 🎉