Netlify is building a branch I didn’t set up for branch deployment.
STEPS TO REPRODUCE
Create a branch named “test.1”. Add a section to
context."test.1".environment] to record env vars for this build. Push your commit from local to remote repo. Add “test.1” as a branch deploy under continuous deployment / deploy contexts. Add “test.1” as a branch under domain management / branch subdomains. The subdomain that results (auto rename) is “test-1.yourdomain.com”. Build works. Publish deploy works.
Create a new branch named “test@1”. Add a section to
context."test@1".environment] and commit locally. DO NOT add “test@1” anywhere in Netlify – do not set up as a deploy context or a branch subdomain. Push your commit to remote repo. Netlify builds the branch. Click on publish deploy – Netlify deploys the OTHER build (“test.1”), not this one.
Build is triggered by a branch name that should not be monitored.
It appears if builds differ only in characters Netlify maps to “-” when converting branch names to subdomain names, the build happens.
Build should be triggered on exact branch name only.
Branch name should NOT be converted to subdomain name before verifying the branch name is a target for a branch subdomain build.
Documentation should point out that branch names with characters other than 0-9, a-z, A-Z and hyphen will be mangled when they’re converted into subdomain names.