Skip to content
BENIBIX Learn

GitHub Actions

Development☁️ DevOps & CloudCI/CD

Also known as GitHub Workflow, Actions, GHA

The CI/CD tool built into GitHub. You set it up with a YAML file.

Think of it like

Think of it like a robot helper in your project. When you push code, it gets to work.

Example

Lucy adds a small workflow file to her repo. Now each pull request runs her tests on a fresh machine. Nobody can merge until they pass.

Why it matters

It lives where the code already is. Setting up CI takes one file and no extra server.

Definition

GitHub Actions is the CI/CD service built into GitHub. You describe the steps in a YAML file in the .github/workflows folder. When something happens, like a push or a pull request, GitHub starts a fresh machine and runs them. Each step can run a command or use a ready-made action shared by others. The results show as a green tick or a red cross next to the commit.

Example code

yaml
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test
On every push, a fresh machine gets the code and runs the tests.

Common mistake

Putting a secret key straight into the workflow file. Store it in the repo's secrets, and read it from there.

Key takeaways

  1. 1
    Built into GitHub. No extra server.
  2. 2
    A YAML file. In .github/workflows.
  3. 3
    Runs on events. Push, pull request, schedule.