This directory contains automated CI/CD workflows for the CommonGround co-parenting platform.
.github/
βββ workflows/
β βββ backend-ci.yml # Backend testing + Render deployment
β βββ frontend-ci.yml # Frontend testing + Vercel deployment
β βββ ai-code-review.yml # AI code review + security scanning
βββ AUTOMATION_SETUP.md # Detailed setup guide
βββ QUICK_START.md # 30-minute quick start
βββ validate-setup.sh # Setup validation script
βββ README.md # This file
New to this? Start here:
- Read QUICK_START.md - Get up and running in 30 minutes
- Run validation:
bash .github/validate-setup.sh - Add required secrets to GitHub
- Push and watch it work!
Want all the details?
Read AUTOMATION_SETUP.md for comprehensive documentation.
- β Runs all tests (backend + frontend)
- β Checks code quality (linting, type checking)
- β Deploys backend to Render
- β Deploys frontend to Vercel
- β Performs health checks
- β Runs all tests
- β AI code review with Claude 3.5 Sonnet
- β Security scanning (vulnerabilities + secrets)
- β Deploys preview to Vercel
- β Comments on PR with feedback
Add these at: https://github.com/simpletech310/CommonGround/settings/secrets/actions
| Secret | Purpose |
|---|---|
VERCEL_TOKEN |
Deploy to Vercel |
VERCEL_ORG_ID |
Vercel organization |
VERCEL_PROJECT_ID |
Vercel project |
RENDER_API_KEY |
Deploy to Render |
RENDER_SERVICE_ID_BACKEND |
Render service ID |
NEXT_PUBLIC_SUPABASE_URL |
Supabase connection |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase auth |
ANTHROPIC_API_KEY |
AI reviews (optional) |
See QUICK_START.md for how to get these values.
Backend Testing & Deployment
Runs on: Push/PR to main or develop (when backend files change)
What it does:
- Sets up Python 3.11 + PostgreSQL test database
- Installs dependencies from requirements.txt
- Runs ruff, black, mypy
- Runs pytest with coverage
- Deploys to Render (main only)
- Health check at
/health
Frontend Testing & Deployment
Runs on: Push/PR to main or develop (when frontend files change)
What it does:
- Sets up Node.js 20
- Installs dependencies with npm ci
- Runs ESLint
- Runs TypeScript type checking
- Builds Next.js app
- Deploys to Vercel
- Production: on
mainbranch - Preview: on pull requests
- Production: on
AI Code Review & Security
Runs on: All pull requests
What it does:
-
AI Review: Claude analyzes code for:
- Security issues (XSS, SQL injection, etc.)
- Type safety problems
- Performance concerns
- Best practice violations
-
Security Scanning:
- Trivy: Scans for vulnerabilities
- TruffleHog: Detects leaked secrets
-
Comments on PR with findings
Check if everything is set up correctly:
bash .github/validate-setup.shThis script checks:
- β Directory structure
- β Workflow files
- β Project configuration
- β Git setup
- β Vercel/Render configuration
https://github.com/simpletech310/CommonGround/actions
Frontend (Vercel):
- Production: https://common-ground-blue.vercel.app
- Dashboard: https://vercel.com/dashboard
Backend (Render):
- Production: https://commonground-api.onrender.com/health
- Dashboard: https://dashboard.render.com/
-
Check workflow permissions:
- Go to: Settings β Actions β General
- Select "Read and write permissions"
- Enable "Allow GitHub Actions to create and approve pull requests"
-
Verify secrets are set:
- Go to: Settings β Secrets and variables β Actions
- Ensure all required secrets are present
-
Check workflow files:
ls -la .github/workflows/
Should show all three
.ymlfiles
Backend (Render):
- Check
RENDER_API_KEYis correct - Verify
RENDER_SERVICE_ID_BACKENDmatches your service - Check Render dashboard for deployment logs
Frontend (Vercel):
- Check
VERCEL_TOKENis valid - Verify
VERCEL_ORG_IDandVERCEL_PROJECT_ID - Run
npx vercel linkto re-link if needed
- Check
ANTHROPIC_API_KEYis set - Verify you have API credits
- Check workflow logs for API errors
# 1. Create feature branch
git checkout -b feature/my-feature
# 2. Make changes, commit
git add .
git commit -m "feat: add new feature"
# 3. Push
git push origin feature/my-feature
# 4. Create PR on GitHub
# 5. Wait for CI checks and AI review
# 6. Address feedback
# 7. Get approval and merge
# 8. Automatic deployment! πDeveloper pushes code
β
GitHub Actions triggers
β
ββββββββββββ¬βββββββββββββββ
β β β
Backend Frontend AI Review
Tests Tests Security
β β β
Deploy Deploy Comment
Render Vercel on PR
β β β
Health Preview Report
Check URL Results
- GitHub Actions: Free (2,000 min/month)
- Vercel: Free tier
- Render: $0-7/month
- Anthropic API: $1-5/month
Total: ~$1-12/month
- Quick Start: QUICK_START.md - 30 min setup
- Full Guide: AUTOMATION_SETUP.md - Complete documentation
- Validation:
bash .github/validate-setup.sh- Check setup
When modifying workflows:
- Test on a feature branch first
- Verify workflows run successfully
- Update documentation if needed
- Get team review before merging
- Workflow Issues: Check Actions tab for logs
- Deployment Issues: Check Vercel/Render dashboards
- Setup Help: See AUTOMATION_SETUP.md
Ready to get started? Read QUICK_START.md β