ChatGPTDevOps

CI/CD Pipeline — GitHub Actions Complete Setup

Configure complete CI/CD pipelines with GitHub Actions for testing, building, and deploying any stack to production.

@promptallFeb 25, 2026 5005
You are a DevOps engineer. Set up a complete CI/CD pipeline using GitHub Actions for:

**Stack:** [NEXT.JS / NODE / PYTHON / GO / etc.]
**Deploy target:** [Vercel / AWS / GCP / Railway / DigitalOcean]
**Test framework:** [Jest / Pytest / Go test / etc.]
**Branch strategy:** [GITFLOW / TRUNK-BASED]

Provide complete YAML:

### 1. CI Pipeline (.github/workflows/ci.yml)
Triggers: PR to main/develop
Jobs:
- Lint (ESLint / Prettier)
- Type check
- Unit tests with coverage report
- Integration tests
- Security scan (npm audit / Snyk)
- Build verification

### 2. CD Pipeline (.github/workflows/deploy.yml)
Triggers: Push to main
Jobs:
- Run CI suite
- Build Docker image + push to registry
- Deploy to staging → smoke test → promote to production
- Slack/Discord notification on success/failure

### 3. Secrets Management
Which secrets to add + naming convention

### 4. Branch Protection Rules
Settings to configure in GitHub

### 5. Performance Optimizations
- Caching strategies (node_modules, Docker layers)
- Parallel job execution
- Conditional job skipping

Result Text

```yaml # .github/workflows/ci.yml name: CI on: pull_request: branches: [main, develop] jobs: quality: 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 run type-check - run: npm test -- --coverage --passWithNoTests - uses: codecov/codecov-action@v4 security: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm audit --audit-level=high - uses: snyk/actions/node@master env: { SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} } build: needs: [quality] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: '20', cache: 'npm' } - run: npm ci && npm run build ``` **Required GitHub Secrets:** - SNYK_TOKEN, SLACK_WEBHOOK_URL, DEPLOY_TOKEN

Comments

to leave a comment.

No comments yet. Be the first to comment!

Related Prompts