image: node:latest

stages:
  - test
  - deploy

test:
  stage: test
  script:
    - npm install
    - npm test

deploy-npm:
  stage: deploy
  script:
    - npm install
    - npm publish
  only:
    - master
  allow_failure: true # fails when version is not increased

image: node:latest

stages:
  - test
  - deploy

test:
  stage: test
  script:
    - npm install
    - npm test

deploy-npm:
  stage: deploy
  script:
    - npm install
    - npm publish
  only:
    - master
  when: manual

Mark the deploy stage as manual
Mark the deploy stage as manual
