GitHub Actions "Unexpected symbol" in a ${{ }} expression
By Daniel Zoghalchali·Latchkey
The expression parser hit a character it does not understand inside a ${{ }} block, usually a bad operator or an unquoted literal.
What this error means
The workflow is rejected with "Unexpected symbol" and the position within the expression.
github-actions
The workflow is not valid. .github/workflows/ci.yml (Line: 9): Unexpected symbol: '"prod'. Located at position 12 within expression: github.ref == "prod
Common causes
Unterminated or unquoted string
String literals inside expressions use single quotes; a missing closing quote or double quotes inside YAML can break parsing.
Unsupported operator
Operators like += or & are not valid; expressions support ==, !=, &&, ||, !, and comparisons.
How to fix it
Use single-quoted literals and valid operators
Wrap string literals in single quotes inside expressions.