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

`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.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflows Not Triggering & Invalid Files