`Invalid workflow file: .github/workflows/ci.yml#L14 You have an error in your yaml syntax on line 14`
BeginnerTroubleshootingWorkflows Not Triggering & Invalid Files
Answer
Likely causes → Tabs instead of spaces, bad indentation, an unquoted value starting with !, *, { or : inside a string, or a ${{ }} expression starting a value that YAML treats as a mapping.
Diagnose →
yq '.' .github/workflows/ci.yml >/dev/null
actionlint .github/workflows/ci.yml
sed -n '10,16p' .github/workflows/ci.yml | cat -A # shows tabs as ^I
Fix → Use spaces, quote strings with special characters, wrap if: ${{ !cond }}.
Prevent → Editor YAML schema validation for GitHub workflows plus actionlint.
More on Workflows Not Triggering & Invalid Files
You pushed a new workflow file and nothing appears in the Actions tab.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.BeginnerA cron set to `0 9 * * *` runs at 14:30 local time, and sometimes 15 minutes late.Beginner