Merge pull request #609 from spicyj/travis

Build the website without publishing on PRs
This commit is contained in:
Ben Alpert 2015-04-01 18:40:15 -07:00
commit fe3bd860ac
1 changed files with 7 additions and 4 deletions

View File

@ -30,13 +30,16 @@ script:
elif [ "$TEST_TYPE" = build_website ]
then
# Automatically publish the website
cd website
npm install
./setup.sh
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
# Automatically publish the website
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
cd website
npm install
./setup.sh
./publish.sh
else
# Make sure the website builds without error
node server/generate.js
fi
else