fix(pages): default-branch deploys need a two-rule split
What
The 4.1.1 fix moved the branch input into a job variable and compared variable to variable — which repairs explicit literal inputs but not the default: nested variables inside a variable value do not expand during rules:if evaluation, so PAGES_DEPLOY_BRANCH holding the text $CI_DEFAULT_BRANCH still compares as a literal and never matches.
Evidence
Verified against a live consumer: with pages@v4.1.1 and the default input, the pages job was absent from the consumer pipeline. With this branch pinned by commit SHA, the pages job schedules and runs.
Fix
The branch input default becomes the empty string, and the rule splits in two:
rules:
- if: $PAGES_DEPLOY_BRANCH == "" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $PAGES_DEPLOY_BRANCHEmpty input → deploy from the project default branch (direct variable-to-variable, no nesting). Explicit input → deploy from exactly that branch.