Your CI/CD pipeline is now fully implemented! Follow these steps to activate it.
Go to your GitHub repository → Settings → Secrets and variables → Actions
Add these secrets:
VERCEL_TOKEN=<your-vercel-token>
VERCEL_ORG_ID=<your-org-id>
VERCEL_PROJECT_ID=<your-project-id>
How to get these:
- Go to https://vercel.com/account/tokens
- Create new token
- Run
vercel linkin your project - Find IDs in
.vercel/project.json
NEXT_PUBLIC_API_URL=<your-api-url>
SENTRY_DSN=<your-sentry-dsn>
SENTRY_AUTH_TOKEN=<your-auth-token>
SENTRY_ORG=<your-org-slug>
SENTRY_PROJECT=<your-project-slug>
How to get these:
- Go to https://sentry.io
- Create project
- Get DSN from project settings
- Create auth token in account settings
LHCI_GITHUB_APP_TOKEN=<your-token>
Go to Settings → Branches → Add rule
Branch name pattern: main
Enable:
- ✅ Require a pull request before merging
- ✅ Require approvals (1 minimum)
- ✅ Require status checks to pass before merging
- Select:
code-quality,test,build,lighthouse
- Select:
- ✅ Require branches to be up to date before merging
- ✅ Require conversation resolution before merging
git checkout -b test/ci-pipeline
echo "# Test" >> TEST.md
git add TEST.md
git commit -m "test: verify CI pipeline"
git push origin test/ci-pipeline- Go to GitHub → Pull Requests
- Check that CI workflow runs
- Verify all checks pass (green checkmarks)
- Check for preview deployment comment
- Merge the PR
- Verify production deployment runs
npm install
npx husky installThis enables:
- Pre-commit: Lint and format
- Pre-push: Run tests
- Commit-msg: Validate commit format
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Check code quality
npm run lint
npm run format:check
npm run type-check- Code quality checks (ESLint, Prettier, TypeScript)
- Unit and integration tests (≥70% coverage)
- Production build verification
- Lighthouse performance checks
- Smoke tests on production
- Auto-rollback on failure
- Error monitoring with Sentry
- Automatic on merge to main
- Manual trigger available
- Preview deployments for every PR
- Every deployment logged
- 90-day retention
- Full audit trail (who, what, when, status)
- Checks every 1 minute
- Alerts if down >3 minutes
- View in Actions tab
- Real-time error tracking
- Session replay
- Performance monitoring
- Access at https://sentry.io
- Performance tracking over time
- Accessibility monitoring
- View reports in Actions artifacts
- CI/CD Guide:
docs/CI-CD.md- Complete pipeline documentation - Contributing:
CONTRIBUTING.md- How to contribute - Implementation:
CI-CD-IMPLEMENTATION.md- What was implemented
See docs/CI-CD.md for detailed troubleshooting
Quick fixes:
# Fix linting
npm run lint -- --fix
# Fix formatting
npm run format
# Fix tests
npm run test:watch- Check Vercel dashboard for logs
- Verify secrets are set correctly
- Check workflow logs in Actions tab
- Read
docs/CI-CD.md - Check
CONTRIBUTING.md - Open an issue
- GitHub secrets configured
- Branch protection enabled
- Test PR created and merged
- Git hooks installed
- Tests run locally
- Documentation reviewed
Your CI/CD pipeline is now active. Every PR will be automatically tested, and merges to main will deploy to production with full monitoring and rollback capabilities.
Next PR you create will:
- Run all quality checks
- Deploy to preview URL
- Comment preview link on PR
- Require all checks to pass before merge
- Auto-deploy to production on merge
- Create audit log
- Monitor for errors
Happy coding! 🚀