0Pricing
CI/CD with GitHub Actions & DevOps Pipelines · Lesson

Path Filtering and Selective Builds

Trigger only the workflows and jobs affected by a change using path filters, change detection, and conditional matrices in monorepos and multi-repo setups.

The Wasted Build Problem

In a monorepo, a change to the documentation should not rebuild and redeploy the backend, the frontend, and the mobile app.

Selective builds run only the parts of the pipeline affected by a change, saving time and runner minutes.

Path Filters on Triggers

The simplest approach is the paths filter on the trigger. A workflow only runs when files matching the pattern change.

on:
  push:
    paths:
      - 'services/api/**'

All lessons in this course

  1. CI/CD for Monorepos
  2. Cross-Repository Workflows
  3. Centralized Workflow Management
  4. Path Filtering and Selective Builds
← Back to CI/CD with GitHub Actions & DevOps Pipelines