Skip to main content

# GitHub Actions: Automating Tests, Builds & Deployments

What Are GitHub Actions?

GitHub Actions are automated workflows that run in response to events in your repository. Push code? Run tests. Merge a PR? Deploy to production. On a schedule? Run a security audit.

Workflows are defined in YAML files inside .github/workflows/.

Your First CI Workflow

Create .github/workflows/ci.yml:

name: CI

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

Unlock this lesson

Upgrade to Pro to access the full content

What you'll learn:

  • Write a GitHub Actions workflow YAML file from scratch
  • Set up CI that runs tests and linting on every pull request
  • Configure deployment automation triggered by merges to main