general:
  artifacts:
    - build/vistk.js
deployment:
  release:
    tag: /v[0-9]+(\.[0-9]+)*/
    owner: romsson
    commands:
      - grunt
      - echo "Deployment script goes here".

general:
  artifacts:
    - build/vistk.js
test:
  post:
    - grunt
deployment:
  release:
    tag: /v[0-9]+(\.[0-9]+)*/
    owner: romsson
    commands:
      - echo "Deployment script goes here".

Build should happen before deployment, after test
Build should happen before deployment, after test

To make sure that even branch builds return a fresh artifact.