GitHub Actions Workflow
Type: $1 (ci | deploy | release | lint - or auto-detect)
- Check existing workflows:
ls .github/workflows/ 2>/dev/null
cat package.json | grep '"scripts"' -A 20
- Generate the appropriate workflow:
CI (test + lint on PR):
name: CI
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20', cache: 'npm' }
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run typecheck
- Add optimizations:
- Dependency caching (
actions/cache) - Matrix testing for multiple Node/Python versions if needed
- Fail-fast vs complete runs
- Concurrency groups (cancel in-progress on new push)
- For deploy workflows: ask for target platform (Vercel, Railway, AWS, Fly.io, etc.)
- Save to
.github/workflows/<type>.yml