Run job only when triggered

I’m trying a setup with one of the jobs (deployment) being run only when trigger is used. As per documentation I’m using triggers keyword:

stages:
  - build
  - deployment

cache:
  key: "$CI_BUILD_REF_NAME"
  paths:
  - Release/

compilation:
  stage: build
  script:
    - ./build.sh

deployment:
  stage: deployment
  only:
    - triggers
  script:
    - ./deployment.sh

Even though the compilation job runs correctly (and has “triggered” label in the “Builds” page), deployment never runs. If I remove the only condition, the job is performed correctly.

Have I misunderstood the documentation or is there some mistake in my .gitlab-ci.yml?

PS: I now I can use a workaround and instead make a condition in the deployment.sh script to check whether the job has been run with a trigger but I’d prefer not having the job run at all upon push.

Apparently I have picked a feature that has been added to GitLab only 8 days ago and my GitLab installation was behind. It works now.