GitHub deployment environment rejected deployment:false due to protection rules
The environment's protection rules are incompatible with deployment: false.
GitHub immediately fails the workflow job when an environment has custom deployment protection rules but the workflow disables deployment object creation with deployment: false.
environment protection rules are incompatible with deployment: falsedeployment
Observed message
The environment's protection rules are incompatible with deployment: false.
Why it happens
The workflow sets environment.deployment to false.
The target GitHub environment has custom deployment protection rules configured.
The workflow and environment settings are logically incompatible.
How to fix it
Remove deployment: false from the workflow if you need to use that protected environment.
Or remove the custom deployment protection rules from the environment.
Retry the workflow after aligning workflow behavior with environment protection settings.