ts-osc/.gitlab-ci.yml
2021-01-23 19:50:22 +01:00

41 lines
656 B
YAML

image: node:12.13
cache:
paths:
- lib/
- docs/
stages:
- build
- deploy
- clean
build:
stage: build
only:
- master
script:
- npm install
- npm run build
pages:
stage: deploy
script:
- mkdir .public
- cp -r ./docs/* .public
- mv .public public
artifacts:
paths:
- public
publish:
stage: deploy
only:
- master
script:
- echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}'
- npm publish
after_script:
- docker rm -v $(docker container ls -q --all --filter=name="runner-*" --filter=status=exited) || true
- docker rmi $(docker images -f"dangling=true" -q) || true