forked from facebookarchive/draft-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (41 loc) · 1.55 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
36
37
38
39
40
41
42
43
44
45
language: node_js
node_js:
- 4
sudo: false
cache:
directories:
- node_modules
before_install:
- |
npm install -g npm@latest-2
npm --version
script:
- |
if [ "$TEST_TYPE" = test ]
then
npm run test-ci
elif [ "$TEST_TYPE" = build_website ]
then
set -e
./node_modules/.bin/gulp
cd website
npm install
./setup.sh
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
# Automatically publish the website
git config --global user.name "Travis CI"
git config --global user.email "[email protected]"
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
./publish.sh
else
# Make sure the website builds without error
node server/generate.js
fi
fi
env:
matrix:
- TEST_TYPE=test
- TEST_TYPE=build_website
global:
# $GITHUB_TOKEN
- secure: "JOaZao55VK0+3Uf2AoPo5qOXBKEUnqwbwfHsPq5746+7zzr4WpSOleYWLCOm3cl/pMuw7MEa8cQ8MzBktvUyuqbYEl6tslqNE+IINXPlrLbZJGbz5US/doNwv6nWk679op4XJin8ZjJy3AsoP8+qRJCzGRepjiNQTT4Yq72lWEEv1ea5RN5CQNobTBJfyJ47+XK+A8Zqea8mV152LO2h0/q96Ny1YQpcG/uQj8KGjd/Gi9OEifheKYZV5YzamWF3zouchVC3uJZTfAs7zOuiz/23ej2HwUwCfE7ZlcM0EvEJ4oEKPhO7ZUt0tLw3O/xIzhIJMngyfWee+jp47SAPioyfW/mzX8S+2ma8dstFsgG7XbVpIwk4906tJFIcOLxrAocXqcSAOC+bS01rFbFzDVdh3czWF8iaSglZh6SWfgn0aAEoNSxZZJffVsxciAG13FlG0bz0MgNqZuNflwE2aN14k2rWYtgz/rpjnMQNE0p98JMuxxC4ezWQ7FwNe+k3OLqSfSiQffeOvLiOqdMQlH5KCLg/7ODtI6vvoxA3IQvYM8s0pZ7OY581aUhaBTZ/GiLGHz8fHuA4URUGNFixEyGvMr6Q1zhNvGmyHOW+vyzx4JOdM6VmW85+mY0M+qJ7TfoUJRM1A3WhvW43X2ghwou4YM35Xj2I7g4DRPEk+XE="