Use the ref slug instead of the full branch name to create the environment URL and drop the slug form the URL/branch prefix since CI_ENVIRONMENT_SLUG ensures uniqueness.
CI_ENVIRONMENT_SLUG