Appearance
Deployment
Docs (AWS CDK + GitHub Actions)
Documentation is deployed to docs.cqr.cch726.shardlab.io via S3 + CloudFront.
Infrastructure (CDK)
The CDK stack in apps/infra/ creates:
- S3 Bucket — Stores built VitePress static files (private, OAC access only)
- CloudFront Distribution — CDN with HTTPS, cache optimization
- ACM Certificate — SSL certificate (us-east-1, DNS validation)
- Route53 Records — A/AAAA records pointing to CloudFront
First-time Setup
bash
# 1. Install CDK dependencies
pnpm install
# 2. Build docs first
pnpm build:docs
# 3. Deploy infrastructure + upload files
pnpm --filter @corporate-qr/infra deploy:docsAfter the first deploy, note the S3 bucket name and CloudFront distribution ID from the CDK output. Set these as GitHub Secrets for CI/CD.
Manual Deploy
bash
# Full deploy (build + upload + invalidate cache)
pnpm deploy:docs
# Preview infrastructure changes
pnpm --filter @corporate-qr/infra diff:docs
# Generate CloudFormation template
pnpm --filter @corporate-qr/infra synth:docs
# Destroy all resources
pnpm --filter @corporate-qr/infra destroy:docsCI/CD (GitHub Actions)
Push to main branch with changes in apps/docs/ triggers automatic deployment.
Required GitHub Secrets:
| Secret | Description |
|---|---|
AWS_ROLE_ARN | OIDC role ARN for AWS credential assumption |
DOCS_S3_BUCKET | S3 bucket name (from CDK output) |
DOCS_CF_DISTRIBUTION_ID | CloudFront distribution ID (from CDK output) |
SLACK_WEBHOOK_URL | Slack webhook for notifications (optional) |
Web (Vercel)
- Connect GitHub repository to Vercel
- Set root directory to
apps/web - Set environment variables in Vercel dashboard:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYDATABASE_URL
- Push to main branch triggers automatic deployment
Mobile (EAS Build)
bash
cd apps/mobile
eas build --platform ios
eas build --platform androidDatabase (Supabase Cloud)
bash
# Link to cloud project (one-time)
supabase link --project-ref <project-id>
# Push migrations
pnpm db:push