Design a CI/CD pipeline for my repo based on my real stack. Not generic 'GitHub Actions tutorial' — actual pipeline for what I have.
LANGUAGES / FRAMEWORKS: {list}
PACKAGE MANAGER: {npm / yarn / pnpm / pip / poetry / cargo / etc.}
TEST SETUP: {what test runners + coverage + e2e}
DB: {if_any}
DEPLOY TARGET: {Vercel / AWS / fly.io / k8s / on-prem}
ENVIRONMENTS: {dev / staging / prod — and how they're triggered}
SECRETS LOCATION: {GitHub Secrets / 1Password / Doppler / Vault}
CURRENT PAIN POINTS in your existing setup: {flaky_tests / slow_builds / no_rollback / etc.}
TEAM SIZE: {how_many_contributors}
CI TOOL preference: {GitHub Actions / GitLab CI / CircleCI / Jenkins / no_preference}
DELIVER:
1. **Pipeline stages** — list the 5-8 stages in order with what each does.
2. **What runs on push to feature branch** vs **what runs on PR to main** vs **what runs on merge to main**.
3. **A complete `.github/workflows/ci.yml` or equivalent** — actual YAML, not pseudocode. Use caching, parallel jobs where useful.
4. **Deploy strategy** — blue-green / canary / rolling, justified for the stack.
5. **Rollback plan** — how to undo in under 5 minutes.
6. **3 cost-saving moves** — common waste in pipelines (always re-downloading deps, running e2e on every commit, etc.).
7. **What to monitor** — pipeline health metrics that tell you when something is broken.0 copies·0 saves·1 views
228 words·1,362 chars
Sample output
Stack: TypeScript Next.js + Postgres + Prisma · Package manager: pnpm · Tests: Vitest unit + Playwright e2e · Deploy: Vercel (Edge) + Supabase Postgres · Envs: dev (local) / staging (auto-deploy from main) / prod (manual promote from staging) · Secrets: Doppler · Pain: Playwright e2e takes 12 min, runs on every PR commit, blocks merges. Team: 4 engineers. CI: GitHub Actions.
1. Pipeline stages:
Parameters
Text generation parameters
FAQ
Make the e2e suite skippable, even on main. The temptation to 'always run e2e to be safe' makes engineers wait 12 min for unrelated changes. The cost is real: cumulative wait time across a team easily exceeds the cost of an incident. The prompt targets ChatGPT (GPT-4) and lives in the Coding & Development category on mycopyprompt.
This prompt is written for ChatGPT (GPT-4). It's a text/chat prompt — paste it into ChatGPT (GPT-4) (or compatible LLMs like Claude or GPT-4) to get the expected output.
1. Click the Copy button on this page to copy the full prompt. 2. Open ChatGPT (GPT-4). 3. Paste the prompt into a new conversation. 4. Replace any {placeholders} with your specifics, then send. Most prompts produce the right output on the first try; complex ones may need 1-2 iterations.
Yes — every prompt on mycopyprompt is free forever. No paywall, no signup wall for browsing or copying. You can use it for personal or commercial work, just don't redistribute the entire mycopyprompt library.
Absolutely — most prompts are templates. Look for {placeholders} (curly braces) and swap them with your own values. You can also reword sections, add constraints, or chain it with other prompts.
See the "Sample output" panel above — that's a real example of what ChatGPT (GPT-4) returns when this prompt runs. Your output will vary in wording but should follow the same structure and depth.
Similar prompts
Matched against every prompt in the catalog by title.
2. When each runs:
main: everything above + e2e (only when changes touch UI files or /app).main: full pipeline + auto-deploy to staging + smoke tests.3. .github/workflows/ci.yml:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PNPM_VERSION: '9'
NODE_VERSION: '20'
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: ${{ env.PNPM_VERSION }} }
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/cache@v4
with:
path: node_modules
key: nm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
lint-typecheck:
needs: install
runs-on: ubuntu-latest
strategy:
matrix:
task: [lint, typecheck]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: ${{ env.PNPM_VERSION }} }
- uses: actions/setup-node@v4
with: { node-version: ${{ env.NODE_VERSION }}, cache: pnpm }
- uses: actions/cache@v4
with:
path: node_modules
key: nm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --offline --frozen-lockfile
- run: pnpm ${{ matrix.task }}
unit-test:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: ${{ env.PNPM_VERSION }} }
- uses: actions/setup-node@v4
with: { node-version: ${{ env.NODE_VERSION }}, cache: pnpm }
- uses: actions/cache@v4
with:
path: node_modules
key: nm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --offline --frozen-lockfile
- run: pnpm test:unit -- --coverage
- uses: actions/upload-artifact@v4
with: { name: coverage, path: coverage }
build:
needs: [lint-typecheck, unit-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: ${{ env.PNPM_VERSION }} }
- uses: actions/setup-node@v4
with: { node-version: ${{ env.NODE_VERSION }}, cache: pnpm }
- uses: actions/cache@v4
with:
path: node_modules
key: nm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- uses: actions/cache@v4
with:
path: .next/cache
key: nextcache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --offline --frozen-lockfile
- run: pnpm build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
e2e:
needs: build
if: |
github.event_name == 'pull_request' &&
(contains(github.event.pull_request.labels.*.name, 'run-e2e') ||
contains(toJson(github.event.pull_request.changed_files), 'app/') ||
contains(toJson(github.event.pull_request.changed_files), 'components/'))
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports: ['5432:5432']
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with: { version: ${{ env.PNPM_VERSION }} }
- uses: actions/setup-node@v4
with: { node-version: ${{ env.NODE_VERSION }}, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm playwright install --with-deps chromium
- run: pnpm db:migrate:test
- run: pnpm test:e2e
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
- if: failure()
uses: actions/upload-artifact@v4
with: { name: playwright-trace, path: test-results }
4. Deploy strategy:
5. Rollback:
vercel alias mycopyprompt.in <previous_deployment_url>.6. Cost-saving moves:
if condition above only runs Playwright when UI changed OR a label is added. Saves 12 min × ~80% of commits..next/cache caching — Next.js incremental builds are 3-5x faster with this cache. Often skipped.pnpm install --offline in downstream jobs — skip network entirely after the first install job. Saves 30-60 seconds per job.7. What to monitor: