wowprompt

GitHub Actions CI workflow for build, test and deploy

Writes a GitHub Actions workflow file that installs dependencies, runs lint and tests, builds the project and optionally deploys on the main branch. Use it to set up continuous integration for a new repository or replace a fragile manual release.

A commented GitHub Actions YAML workflow with build, test and deploy jobs, a table of required secrets and a list of checks it runs
The output this prompt produced, unedited.

The prompt

Goal

Produce a working workflow file that catches broken code on every pull request and deploys only tested code from the main branch.

Inputs

  • Language and package manager: [e.g. Node 20 with npm, Python 3.12 with pip]
  • Commands: [install, lint, test, build]
  • Deploy target: [e.g. static hosting, container registry, server over SSH, none]
  • Branches: [e.g. pull requests to main, pushes to main]
  • Secrets needed: [names only]

Steps

  1. Trigger on pull requests and pushes to the chosen branches.
  2. Set up the runtime and cache dependencies.
  3. Run lint and tests; fail fast on errors.
  4. Build and upload the build output as an artifact.
  5. Add a deploy job that needs the build job and runs only on the main branch.

Output format

  1. The full YAML file in one code block, with short comments explaining each job.
  2. | Secret name | Used in step | Where to create it |
  3. What runs on a pull request versus a push to main, as two short lists.
  4. How to test the workflow safely before the first deploy.

Check before answering

  • Secrets are read through the secrets context, never written in the file.
  • Permissions are set to the minimum needed, with read-only contents by default.
  • Third-party actions are pinned to a version.
  • A concurrency rule stops two deploys running at once.
  • The deploy job never runs on pull requests from forks.
github actionsci cd pipelinegithub workflow yamlcontinuous integrationautomated testingdeploy pipeline

How to run this

Copy the prompt and paste it into Gemini, then set the aspect ratio to 3:4. No reference photo is needed for this one.

The prompt is written in Markdown with each part under its own heading, which is what the copy action hands over. Change one section at a time, keeping the rest intact, so you can tell which change did the work.

Related prompts

All productivity