forked from reach/reach-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (35 loc) · 1.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: node_js
node_js: node
cache: yarn
jobs:
include:
- stage: Test
before_script: yarn build
script: yarn test
- stage: Release
if: tag =~ ^v[0-9]
before_script: yarn build
script: echo "Publishing $TRAVIS_TAG to npm ..."
before_deploy: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > "$HOME/.npmrc"
deploy:
provider: script
skip_cleanup: true
script: lerna publish from-git --yes --pre-dist-tag next
on:
tags: true
- stage: Deploy Website
if: branch = website
before_script: yarn build
script: echo "Deploying website to https://reacttraining.com/reach-ui/"
before_deploy:
- openssl aes-256-cbc -K $encrypted_e12d3fc86b46_key -iv $encrypted_e12d3fc86b46_iv
-in website-deploy-key.enc -out website-deploy-key -d
- chmod 600 website-deploy-key
- eval $(ssh-agent -s)
- ssh-add website-deploy-key
deploy:
provider: script
script: bash scripts/deploy-website.sh
skip_cleanup: true
on:
branch: website