boros
Version:
TDCX Design System
60 lines (53 loc) • 957 B
YAML
image: docker:stable
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
Unit_Tests:
stage: test
script:
- npm run test
tags:
- reactjs
Build:
stage: build
script:
- npm install --silent
artifacts:
paths:
- dist/
tags:
- reactjs
Build_docs:
stage: build
only:
- master
script:
- npm run build:docs
artifacts:
paths:
- docs/
tags:
- reactjs
Deploy:
stage: deploy
only:
- master
script:
- rsync -avuq --rsh=ssh --delete "./docs/" gitlab-runner-boros@beta.teledirectgroup.com:/var/www/boros.tdcx.com/ --exclude "dev"
tags:
- reactjs
Publish:
stage: deploy
only:
- tags
except:
- branches
- /^[^v]/
script:
- npm version from-git -m "Release v%s"
- npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- npm publish --verbose
tags:
- reactjs