Skip to content

Chapter 1 of 9

Introduction to GitHub Actions

Learn CI/CD foundations and how repository events become automated workflow runs.

30 minutes 10 quick checksBy Subha Prasad
Lesson 1 of 9Course navigation

Lesson content

Read, practise, then check your understanding

Introduction to GitHub Actions

GitHub Actions is GitHub's repository-native automation platform. It connects an event—such as a push, pull request, release, schedule, or manual request—to a workflow made of jobs. Teams use it for continuous integration, controlled delivery, releases, dependency maintenance, and repository operations.

Core ideas

  • Continuous integration (CI) validates small, frequent changes through repeatable builds and checks.
  • Continuous delivery keeps a verified artifact ready to release; continuous deployment also releases it automatically.
  • A workflow is versioned with the application in .github/workflows, so automation changes receive the same review as code.
  • Every trigger creates a workflow run. A run contains one or more jobs, and each job executes steps on a runner.

How it works

A practical first pipeline checks out the exact commit, installs dependencies reproducibly, and runs a deterministic validation command. A failing step normally fails its job and blocks dependent jobs. Branch protection can require the resulting check before a pull request merges.

Configuration example

name: CI
on:
  pull_request:
  push:
    branches: [main]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npm run build

Read the example from top to bottom: the trigger creates a run, the job requests a runner, and each step receives only the context configured for it. Adapt names, versions, permissions, and commands to the repository rather than copying production credentials or policies blindly.

Production guidance

  • Give workflows and jobs meaningful names because they appear in checks and run history.
  • Separate validation from deployment, then protect deployment with environments and approvals.
  • Treat workflow code as production code: review it, restrict permissions, and investigate unexpected changes.

The chapter quiz follows this lesson and checks both the vocabulary and the operational decisions behind the configuration.

Knowledge check

Answer every question correctly to complete this chapter.

Which statement correctly describes continuous integration?
Which term matches this explanation: Frequently merging changes and automatically validating them.
Which statement correctly describes continuous delivery?
Which term matches this explanation: Keeping validated software ready for a controlled release.
Which statement correctly describes workflow?
Which term matches this explanation: A configurable automated process defined in a repository YAML file.
Which statement correctly describes workflow run?
Which term matches this explanation: One execution of a workflow caused by an event or manual request.
Which statement correctly describes repository automation?
Which term matches this explanation: Automating repository work such as builds, checks, releases, and triage.

0 of 10 checks passed

Your progress is saved on this device.

Introduction to GitHub Actions | Actions Lesson | Subha Prasad