Back to Browse
📦Automation

GitHub Actions CI/CD Pipeline

A complete GitHub Actions workflow generator for Next.js apps. Includes testing, linting, building, and deployment to Vercel or Docker.

Prompt Content
Generate a GitHub Actions workflow YAML for a Next.js application with the following pipeline:

```yaml
name: CI/CD Pipeline

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  NODE_VERSION: '20'

jobs:
  # Job 1: Lint & Type Check
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm run lint
      - run: npm run check-types

  # Job 2: Tests
  test:
    needs: quality
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:16
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm test -- --coverage
      - uses: codecov/codecov-action@v4
        if: always()

  # Job 3: Build & Deploy
  deploy:
    needs: test
    if: github.ref == 'refs/heads/main' && github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm run build
      - name: Deploy
        run: echo "Add your deployment step here"
```

Customize: database service, deployment target, env vars, and test runner.
GitHub Actions CI/CD Pipeline
No variables detected in this prompt.
188 words1701 chars~426 tokens

Live Preview

Generate a GitHub Actions workflow YAML for a Next.js application with the following pipeline:

```yaml
name: CI/CD Pipeline

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  NODE_VERSION: '20'

jobs:
  # Job 1: Lint & Type Check
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm run lint
      - run: npm run check-types

  # Job 2: Tests
  test:
    needs: quality
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:16
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 5432:5432
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm test -- --coverage
      - uses: codecov/codecov-action@v4
        if: always()

  # Job 3: Build & Deploy
  deploy:
    needs: test
    if: github.ref == 'refs/heads/main' && github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ env.NODE_VERSION }}
          cache: 'npm'
      - run: npm ci
      - run: npm run build
      - name: Deploy
        run: echo "Add your deployment step here"
```

Customize: database service, deployment target, env vars, and test runner.

Related Prompts

Generate complete email marketing sequences — welcome series, onboarding, re-engagement. Each email optimized for opens and clicks.

emailmarketingautomationsequence+1
1890

A reusable Python data analysis pipeline template. Handles CSV/JSON input, cleaning, analysis, and visualization output.

data analysisPythonpandasvisualization+1
1345

Generate production-ready Terraform configurations for AWS. Includes VPC, ECS, RDS, S3, and monitoring with best practices baked in.

terraformAWSinfrastructureDevOps+1
1234
Statistics
Copies1,456
Likes712
Added4/4/2026
Author

DevOpsPro

Framework
generic
Tags
CI/CDGitHub ActionsdeploymentDevOpsautomation
Categories
AutomationDevOps