๐ GitHub Actions Workflow - Quick Reference
๐ฏ Deployment Pipeline Overviewโ
Feature Branch -> PR to Beta
Beta Branch -> Deploy Beta -> PR to Alpha
Alpha Branch -> Deploy Alpha -> PR to Main
Main Branch -> Deploy Production
For the AttuneLogic Service (web app) there is also an optional staging branch path that skips Beta when it is unstable:
Staging Branch (`staging/*`) โ Alpha โ Production
โ โ โ
Auto Deploy Auto Auto
to Alpha PR/merge PR/merge
๐ Daily Developer Workflowโ
1. Feature Developmentโ
# Create feature branch
git checkout -b feature/security-improvements
# Make changes and commit
git add .
git commit -m "feat: add rate limiting protection"
# Push to trigger build validation and PR creation
git push origin feature/security-improvements
Result: Build validation runs and an automatic PR is opened to beta
2. Beta Testingโ
- Review: Auto-created PR in GitHub
- Merge: Feature branch โ
beta - Result after merge:
betadeploys tohttps://beta.api.{domain}/health
3. Alpha Stagingโ
# Merge to beta or update beta directly
# Review auto-created PR: beta โ alpha
# Beta deploy URL: https://beta.api.{domain}/health
# Merge beta โ alpha after validation
4. Production Releaseโ
# Merge alpha -> main to trigger production deployment
# Auto version bump (patch/minor/major)
# Production URL: https://api.{domain}/health
๐ Branch Strategyโ
| Branch | Purpose | Triggers | Auto-deploys to |
|---|---|---|---|
feature/* | Development | Push | - |
beta | Integration / beta deploy source | Push or merge | Beta |
alpha | Staging / alpha deploy source | Push or merge | Alpha |
main | Production deploy source | Push | Production |
staging/** | Direct Alpha when Beta is unstable (UI) | Push (service repo) | Alpha |
staging/*branches are implemented in the AttuneLogic Service (frontend) workflow to allow a Dev โ Alpha โ Prod path when the shared Beta environment is temporarily unstable. The API workflow continues to use the standard feature -> PR to beta -> beta -> alpha -> production path.
๐ฎ Manual Deployment Optionsโ
GitHub UI Methodโ
- Go to Actions tab
- Select "API Multi-Stage Deploy"
- Click "Run workflow"
- Choose target environment:
beta,alpha, orproduction
Emergency Production Deployโ
# Use the dedicated emergency workflow for urgent production fixes
gh workflow run "๐จ Emergency Production Deploy" \
-f reason="Critical production issue" \
-f branch="fix/urgent-production-fix"
๐ Commit Message Conventionsโ
| Type | Example | Version Bump |
|---|---|---|
| Fix | fix: resolve authentication bug | Patch (2.9.0 โ 2.9.1) |
| Feature | feat: add brute force protection [MINOR] | Minor (2.9.0 โ 2.10.0) |
| Breaking | feat!: new API structure [MAJOR] | Major (2.9.0 โ 3.0.0) |
๐ Environment URLsโ
| Environment | URL Pattern | Purpose |
|---|---|---|
| Beta | https://beta.api.{domain} | Feature testing |
| Alpha | https://alpha.api.{domain} | Staging/UAT |
| Production | https://api.{domain} | Live system |
Health Check Endpointsโ
curl https://beta.api.{domain}/health
curl https://alpha.api.{domain}/health
curl https://api.{domain}/health
โก Quick Commandsโ
Pre-Push Validationโ
npm run type-check # TypeScript validation
npm run build # Build verification
npm run test:safe # Test suite
npm run test:safe is still recommended locally, but the standard API deploy workflow is currently enforcing type-check + build and packaging the deploy artifact.
Local Developmentโ
npm run dev # Development server
npm run test:watch # Watch mode testing
๐จ Common Issues & Quick Fixesโ
| Issue | Quick Fix |
|---|---|
| Build fails | Run npm run type-check locally |
| Tests fail | Run npm run test:safe locally |
| Deploy fails | Check SSH secrets in repo settings |
| PR not created | Verify GitHub token permissions |
๐ Workflow Status Indicatorsโ
โ Success Indicatorsโ
- Green checkmarks in Actions tab
- Auto-PR created with deployment details
- Health endpoint returns 200 OK
- Version number updated (production)
โ Failure Indicatorsโ
- Red X in Actions tab
- No auto-PR created
- Health endpoint fails
- Error logs in workflow details
๐ Rollback Procedureโ
Quick Rollbackโ
- Revert the problematic commit in
alphabranch - Push to trigger automatic production deployment
- Create hotfix branch for proper fix
- Test fix in beta โ alpha โ production
Emergency Rollbackโ
- Revert the bad change on a
fix/*orhotfix/*branch - Deploy that revert through the emergency workflow only if production cannot wait
- After stability is restored, promote the final fix through the normal path
- Avoid force-push rollback on shared release branches
๐ฏ Environment-Specific Testingโ
Beta Environment ๐งชโ
- Purpose: Feature validation
- Data: Test data only
- Stability: May be unstable
- Access: Development team
Alpha Environment ๐ฏโ
- Purpose: Staging/UAT
- Data: Production-like
- Stability: Should be stable
- Access: Extended team + stakeholders
Production Environment ๐โ
- Purpose: Live customer system
- Data: Real customer data
- Stability: Must be highly available
- Access: Restricted + monitored
๐ Quick Supportโ
Workflow Issuesโ
- Check Actions tab for error details
- Verify all required secrets are set
- Ensure branch protection rules are correct
- Check environment configurations
Deployment Issuesโ
- Verify SSH connectivity to servers
- Check server disk space and resources
- Validate environment-specific configurations
- Review deployment action logs
๐ก Pro Tip: Always test locally with the pre-push validation commands before pushing to avoid pipeline failures!