The workflow runs on push to `main` but never on pull requests.
BeginnerTroubleshootingWorkflows Not Triggering & Invalid Files
Answer
Likely causes → pull_request.branches lists the head branch instead of the base, the PR is a draft and jobs skip drafts, the PR has merge conflicts (no merge commit can be created, so pull_request runs do not start), or path filters exclude the changed files.
Diagnose →
yq '.on' .github/workflows/ci.yml
gh pr view 42 --json mergeable,isDraft,baseRefName,files
Fix → Filter by base branch (branches: [main]), resolve conflicts, adjust paths.
Prevent → Document that branches under pull_request means target branch.
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 "Run workflow" button for `workflow_dispatch` does not appear.BeginnerA scheduled workflow stopped running weeks ago, no errors.BeginnerA cron set to `0 9 * * *` runs at 14:30 local time, and sometimes 15 minutes late.Beginner