A workflow with `paths: ['src/**']` did not run for a PR that changed `src/app.js`.
IntermediateTroubleshootingWorkflows Not Triggering & Invalid Files
Answer
Likely causes → The PR changes more than 300 files and src/app.js is not in the first 300 evaluated, the PR is from a branch with a weird base, or another filter (branches) does not match.
Diagnose →
gh pr view 42 --json files --jq '.files | length'
gh pr view 42 --json baseRefName
Fix → Split huge PRs, or drop workflow-level path filters for required workflows and filter at job level.
Prevent → Avoid relying on path filters for correctness; use them for cost only.
More on Workflows Not Triggering & Invalid Files
You pushed a new workflow file and nothing appears in the Actions tab.Beginner`Invalid workflow file: .github/workflows/ci.yml#L14 You have an error in your yaml syntax on line 14`Beginner`The workflow is not valid. .github/workflows/ci.yml (Line: 9, Col: 5): Unexpected value 'steps'`BeginnerThe workflow runs on push to `main` but never on pull requests.BeginnerThe "Run workflow" button for `workflow_dispatch` does not appear.BeginnerA scheduled workflow stopped running weeks ago, no errors.Beginner