This directory contains GitHub Actions workflows for the TripSage AI project.
Primary CI workflow for frontend development
- Triggers: Push/PR to main/develop/feat/* branches with frontend changes
- Jobs:
- Build and Test: Essential checks for reliable deployments
- Build: Next.js production build with caching
- Format Check: Biome formatting validation
- Type Check: TypeScript type validation (non-blocking)
- Security Audit: NPM audit for vulnerabilities (non-blocking)
- Artifact Upload: Build artifacts for deployment
Vercel deployment automation with concurrency control
- Triggers:
- Push to main branch
- Successful completion of Frontend CI workflow
- Jobs:
- Production Deploy: Deploys to Vercel production
- Preview Deploy: Creates preview deployments for PRs
- Features:
- Concurrency control to prevent deployment conflicts
- Automatic artifact handling
Automated dependency updates
- Schedule: Weekly on Mondays at 9:00 AM
- Scope:
- Frontend NPM packages (grouped by type)
- Python dependencies
- GitHub Actions
- Configuration: Auto-assigns to @BjornMelin for review
Add these secrets to your GitHub repository:
# Vercel deployment
VERCEL_TOKEN=your_vercel_token
VERCEL_ORG_ID=your_org_id
VERCEL_PROJECT_ID=your_project_id
# Optional: Code coverage
CODECOV_TOKEN=your_codecov_token
📖 For detailed deployment setup with cost estimates, see DEPLOYMENT.md
Recommended branch protection rules for main
:
- Require status checks to pass before merging
- Require branches to be up to date before merging
- Required status checks:
Frontend CI/CD / Build Application
Frontend CI/CD / Lint and Format
Frontend CI/CD / Unit Tests
- Next.js build cache using GitHub Actions cache
- Dependency caching with pnpm
- Significantly reduces build times
- Vitest unit tests with coverage reporting
- Playwright E2E tests with HTML reports
- Coverage uploads to Codecov (if configured)
- Biome for fast linting and formatting
- ESLint for additional React/Next.js rules
- TypeScript strict type checking
- Security vulnerability scanning
- Automatic production deployment on main branch
- Preview deployments for pull requests
- Vercel integration with optimized builds
- Create feature branch:
git checkout -b feat/your-feature
- Make changes in
frontend/
directory - Push to trigger CI:
git push origin feat/your-feature
- Create PR to see preview deployment
- Merge PR to main branch
- Automatic deployment to production
- Monitor deployment status in GitHub Actions
Build Failures:
- Check Node.js version compatibility (uses Node 20)
- Verify pnpm lockfile is up to date
- Review build logs for specific errors
Test Failures:
- Unit tests may fail due to incomplete mocking
- E2E tests require successful build
- Check test reports in GitHub Actions artifacts
Deployment Issues:
- Verify Vercel secrets are configured
- Check Vercel project settings
- Review deployment logs in Vercel dashboard
- Check GitHub Actions logs for detailed error messages
- Review individual job outputs
- Use simple CI workflow for rapid iteration during development