Complete automated CI/CD infrastructure for SprintFund, a DAO governance platform on Stacks blockchain.
When you push code:
- Smart Contracts: Validated and tested (2 min)
- Frontend: Linted, type-checked, tested, built (8 min)
- Security: CodeQL scanned, secrets checked (5 min)
- Deploy: Preview deployed to Vercel if PR (3 min)
Total: ~15 minutes, all automatic
Go to GitHub Settings → Secrets → Actions
Add these:
VERCEL_TOKEN=your-vercel-token
VERCEL_ORG_ID=your-org-id
VERCEL_PROJECT_ID=your-project-id
Get from: https://vercel.com/settings/tokens
git checkout -b feature/my-feature
# ... make changes ...
git commit -m "feat: add transaction tracking"
git push origin feature/my-featureGo to GitHub → Create Pull Request
Automatic checks will run and post results.
PR approved? Merge to main.
Production deployment runs automatically.
Start here:
- Contributing - How to contribute
- Environment Setup - Setup variables
- Workflows - What each workflow does
- Troubleshooting - Fix issues
- Index - Full documentation map
# View workflow status
gh workflow list
# View recent runs
gh run list --limit 10
# View specific run details
gh run view <run-id> --log
# Re-run failed workflow
gh run rerun <run-id>
# Check workflow file syntax
gh workflow view ci.ymlMust pass before merge:
- ✅ ci/contract-check - Smart contract syntax
- ✅ ci/contract-tests - Smart contract tests
- ✅ ci/frontend-lint - Code quality
- ✅ ci/frontend-build - Build succeeds
- ✅ ci/frontend-tests - Unit tests pass
- ✅ ci/type-check - TypeScript errors
- ✅ ci/code-quality - Code analysis
| Task | Time | Status |
|---|---|---|
| Smart contracts | 2 min | ✅ |
| Frontend | 8 min | ✅ |
| Security | 5 min | ✅ |
| Deploy | 3 min | ✅ |
| Total | ~15 min | ✅ |
- ci.yml - Main pipeline
- Runs on all branches
- Validates code quality
- Runs tests
- ci.yml - Validation (above)
- deploy-preview.yml - Preview deployment
- Posts URL on PR
- Test live environment
- deploy-production.yml - Production
- Deploys to Vercel
- Goes live immediately
- security.yml - Weekly security scan
- scheduled-maintenance.yml - Weekly maintenance
- code-quality.yml - Quality checks
PR Created
↓
ci.yml runs (validation)
↓
deploy-preview.yml runs (preview URL posted)
↓
Approved & Merged
↓
deploy-production.yml runs (goes live)
- Check error message in GitHub Actions
- Run locally:
npm test && npm run lint && npm run build - Fix issue
- Push again
- Check deploy-preview.yml logs
- Verify VERCEL_* secrets are set
- Check Vercel project settings
- Verify all status checks passed
- Check deploy-production.yml logs
- Verify branch protection rules
- Try manual re-run
See TROUBLESHOOTING.md for more.
| File | Purpose |
|---|---|
.github/workflows/ci.yml |
Main CI pipeline |
.github/workflows/deploy-preview.yml |
PR previews |
.github/workflows/deploy-production.yml |
Production |
.github/CONTRIBUTING.md |
How to contribute |
.github/ENV_VARIABLES.md |
Setup guide |
.github/TROUBLESHOOTING.md |
Fixes |
.github/INCIDENT_RESPONSE.md |
Emergencies |
Required in GitHub Secrets:
VERCEL_TOKEN - Vercel API key
VERCEL_ORG_ID - Vercel org ID
VERCEL_PROJECT_ID - Vercel project ID
Optional for local development (.env.local):
NEXT_PUBLIC_STACKS_API_URL=https://mainnet.stacks.co
NEXT_PUBLIC_CONTRACT_ADDRESS=...
- General questions → Read CONTRIBUTING.md
- Setup issues → Read ENV_VARIABLES.md
- Failures → Read TROUBLESHOOTING.md
- Emergencies → Read INCIDENT_RESPONSE.md
- Everything → Read INDEX.md
Ready to contribute? → Start with CONTRIBUTING.md