Use `paths` to scope the workflow to files or directories.
Section: Filters and concurrency
Run only when selected paths change
yaml
yaml
on:
push:
paths:
- "src/**"
- "package.json"
- ".github/workflows/ci.yml"Explanation
Path filters save minutes and cost by skipping unrelated changes.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Filters and concurrency