The workflow attempts to skip the deployment step when it is run on other branches, however environment protection rules are checked before this, causing a failure.