Skip to content
Latchkey

How to Skip CI on Docs-Only Changes in GitHub Actions

A paths-ignore filter keeps the workflow from triggering when a push touches only documentation files.

Add paths-ignore under the push and pull_request events listing your docs globs. A commit that changes only those files does not start the workflow.

Steps

  • Add paths-ignore: under on.push and on.pull_request.
  • List docs globs such as **/*.md and docs/**.
  • Keep code paths uncovered so real changes still trigger CI.

Workflow

.github/workflows/ci.yml
on:
  push:
    paths-ignore:
      - '**/*.md'
      - 'docs/**'
      - '.github/ISSUE_TEMPLATE/**'
  pull_request:
    paths-ignore:
      - '**/*.md'
      - 'docs/**'

Gotchas

  • If the workflow is a required check, a skipped run can block merges; pair it with a placeholder that reports success.
  • A commit that touches both code and docs still runs, since not all paths are ignored.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →