image: node:10 cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ before_script: - npm install stages: - test - deploy unit: stage: test tags: - k8s-dev-eauction script: "npm test" lint: stage: test tags: - k8s-dev-eauction script: "npm run lint" publish: stage: deploy tags: - k8s-dev-eauction only: - /^v\d+\.\d+\..+$/ #match npm version tag except: - branches script: - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'>.npmrc - npm run build & npm run build:browser - npm publish pages: tags: - k8s-dev-eauction script: - npm install --only=dev - npm run docs - mv docs/pages public artifacts: paths: - public only: - /^v\d+\.\d+\..+$/ #match npm version tag