Interview Prep/GitHub Actions/Workflows Not Triggering & Invalid Files

`No event triggers defined in "on"`

BeginnerTroubleshootingWorkflows Not Triggering & Invalid Files
Answer

Likely causes → on: is empty, misspelled (On: or trigger:), or indentation placed events under another key. In YAML 1.1, unquoted on can parse as boolean true in some tools, but GitHub handles it; the problem is usually structure.

Diagnose →

yq '.on' .github/workflows/ci.yml

Fix → Add at least one event under on:, correctly indented.

Prevent → actionlint.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files