image: node:12 stages: - check - build - test - deploy Audit: stage: check allow_failure: true before_script: - npm ci script: - npm audit Static Test: stage: check before_script: - npm ci script: - npm run check Unit Test: stage: check before_script: - npm ci script: - npm test Build Lib: stage: build before_script: - npm ci script: - npm run build Build Storybok: stage: build before_script: - npm ci script: - npm run build:storybook Deploy (NPM): stage: deploy dependencies: - Build Lib only: - master script: - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc - npm ci - npm run build - npm publish --access public