Skip to content
CI/CDGitHub ActionsTroubleshootingDevOps

Your First CI/CD Pipeline with GitHub Actions

July 5, 2026 · 11 min read

Last verified: 2026-07-17

Frequently Asked Questions

What is CI/CD?

CI/CD is the practice of automatically testing and preparing code changes for release. CI (Continuous Integration) builds and tests your code on every commit; CD (Continuous Delivery/Deployment) automatically ships what passes. The goal is to catch bugs early and eliminate repetitive manual work.

How does GitHub Actions work?

You put a YAML file under `.github/workflows/` in your repository. It defines the jobs and steps to run on certain events, such as push or pull request. GitHub runs those jobs on its own servers, called runners.

What do workflow, job, step, action, and runner mean in GitHub Actions?

A workflow is the YAML file defining the whole automation; a job is a unit of work that runs in parallel or in sequence; a step is a single command or action inside a job. An action is a reusable prebuilt step (e.g. checkout), and a runner is the virtual machine that runs jobs.

How do you store API keys and secrets in GitHub Actions?

Secrets should always be kept in GitHub Secrets and never hardcoded in YAML, otherwise action logs and fork PRs can leak them. You access them in a workflow with `${{ secrets.X }}`, where they appear masked in logs. Also note that secrets do not flow to forks on the pull_request trigger.

How do you fix the 'npm ci can only install with an existing package-lock.json' error in GitHub Actions?

This error means there is no `package-lock.json` in the repo. The fix is to either use `npm install` instead of `npm ci`, or commit the lockfile. Similarly, a 'jest: not found' error means dev dependencies weren't installed; using setup-node caching with `npm ci` installs them, including devDependencies.

Reading isn't enough — do it.

Practice these topics in an interactive terminal in your browser.