🚀

GitHub Actions CI/CD Pipeline

Set up a complete CI/CD pipeline with testing, building, and deployment

Intermediate🚀 DevOpsAll Models
prompt template
Create a GitHub Actions CI/CD pipeline for my project.

**Stack:** [YOUR_STACK — e.g., "Next.js, PostgreSQL, deployed to Vercel"]
**Package manager:** [npm / pnpm / yarn / bun]
**Test framework:** [vitest / jest / playwright]

Generate a `.github/workflows/ci.yml` that:

**On pull request:**
1. Install dependencies (with caching)
2. Run TypeScript type checking
3. Run ESLint
4. Run unit tests with coverage report
5. Run build to catch compile errors
6. Post a comment with test results summary

**On push to main:**
1. All of the above, plus:
2. Run E2E tests against a preview deployment
3. Deploy to production (if all checks pass)

Include:
- Dependency caching for faster runs
- Parallel jobs where possible
- Matrix testing if relevant (Node versions)
- Proper secret handling for environment variables
- Status badges markdown for README
- Estimated run time for each job

Use current best practices and latest action versions.

How to Use This Prompt

  1. 1Copy the prompt template above
  2. 2Paste into Claude, ChatGPT, or Cursor
  3. 3Replace [bracketed placeholders] with your specific project details
  4. 4Iterate on the AI output to refine and customize the results