Prompt

GitHub Actions CI/CD setup

Technology / CI/CD & DevOps1 observationLast seen Oct 19, 2026

Latest observation

Oct 19, 2026OpenAI APIWeb search: off

Here’s a practical GitHub Actions CI/CD setup you can use as a starting point. I’ll keep it generic, then I can tailor it if you tell me your stack (Node, Python, Java, Docker, etc.).


1) Typical CI/CD flow

A simple setup usually has:

  • CI on pull requests / pushes to main
    • install dependencies
    • run tests
    • run lint/format checks
    • build the app
  • CD on merge to main or version tags
    • build artifact or Docker image
    • push to registry or deploy to server/cloud

2) Example repo structure

.github/
  workflows/
    ci.yml
    cd.yml

3) CI workflow example

This runs tests on every PR and push to main.

name: CI

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up runtime
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Lint
        run: npm run lint --if-present

      - name: Test
        run: npm test --if-present

      - name: Build
        run: npm run build --if-present

4) CD workflow example

This builds and deploys when you push a version tag like v1.0.0.

name: CD

on:
  push:
    tags:
      - "v*.*.*"

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up runtime
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npm run build --if-present

      - name: Deploy
        run: echo "Add your deployment command here"

5) If you deploy with Docker

Example workflow to build and push an image to GitHub Container Registry:

name: Docker Build and Push

on:
  push:
    branches:
      - main

jobs:
  docker:
    runs-on: ubuntu-latest

    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Log in to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: ghcr.io/${{ github.repository }}:latest

6) Secrets and environment variables

Use GitHub Secrets for sensitive data:

  • DEPLOY_KEY
  • SSH_HOST
  • API_TOKEN
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Add them in:

Repo → Settings → Secrets and variables → Actions

Then reference them like:

${{ secrets.DEPLOY_KEY }}

7) Good practices

  • Use npm ci / equivalent locked installs in CI
  • Separate CI and CD workflows
  • Use protected branches for main
  • Require CI to pass before merge
  • Pin action versions (@v4, not @main)
  • Use environments for production approvals
  • Cache dependencies for faster builds
  • Add concurrency to avoid duplicate deploys

Example:

concurrency:
  group: production
  cancel-in-progress: true

8) Common deployment targets

Depending on your app, CD may deploy to:

  • GitHub Pages
  • AWS
  • Azure
  • GCP
  • Vercel
  • Netlify
  • Docker host / VM
  • Kubernetes

If you want, I can generate a ready-to-use GitHub Actions workflow for your exact stack, for example:

  • Node.js + Jest
  • Python + pytest
  • Java + Maven
  • Docker + Kubernetes
  • Deploy to AWS / Azure / Vercel / Netlify

Just tell me your tech stack and deployment target.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.