Use rules instead of only/except
Since GitLab introduced rules
, we should replace the only
and except
keywords with rules.
At the same time, we should simplify the deployment script to refer in the script to the environments instead of the branch names etc., so that we need to define the logic for the environment only once (at the pipeline level).