How do I create ci/cd that only deploys development branch when development branch is committed?

With the yml below, the master branch gets deployed when development is committed. I need master to deploy only when master is committed, development to deploy only when development is committed. I’m sure that only: is involved, but it’s not clear how it’s meant to be used in this situation.

stages:
  - deploy

deploy-master:
  stage: deploy
  script:
    - powershell Copy-Item $CI_PROJECT_DIR -Destination 'D:\Admin\Production' -Force -Recurse -ErrorAction "SilentlyContinue"
    - powershell Copy-Item D:\Admin\Production\mars_integration\resources\production -Destination 'D:\Admin\Production\mars_integration' -Force -Recurse -ErrorAction "SilentlyContinue"
    - Set-Location -Path D:\Admin\Production\mars_integration
    - d:\commandbox\box install --production 

deploy-development:
  stage: deploy
  script:
    - powershell Copy-Item $CI_PROJECT_DIR -Destination 'D:\Admin\Staging' -Force -Recurse -ErrorAction "SilentlyContinue"
    - Set-Location -Path D:\Admin\Staging\mars_integration
    - d:\commandbox\box install --development

We have plenty of .gitlab-ci.yml files that have

  only:
    - master@<group>/<project>

to make them only applicable on the master branch.

If I remember it correctly, GitLab wants to phase out the usage of “only” in favour of rules, but there are things that are not possible with rules yet (I don’t remember if this was - and rules generally seems like a bad idea, yaml is not meant for logic), so for now I’ve chosen not to look further into that.