Merge pull request #381 from facebook/autopush-travis

Autobuild website on Travis
This commit is contained in:
Ben Alpert 2015-03-27 20:14:07 -07:00
commit 7e9bbb61bf
2 changed files with 16 additions and 3 deletions

View File

@ -16,10 +16,19 @@ after_script:
- rm packager.pid
# Automatically publish the website
after_success: '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && (cd website; npm install; ./setup.sh; ./publish.sh; echo) || echo'
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
cd website
npm install
./setup.sh
./publish.sh
fi
env:
- secure: "g8Xjbslq4R+3oLVgBvXM5QhiJ+7q+H+dH4+sXReyyZ64M5gf32U7oOjQNVkdx79dnGFc6a619otGsX4RiEkQlkiR+4uCgJUIgPwN4YFCIgYu4Z/0FnbbRu5yyywh5zv4WwGmAtMkgGztoMBnps5gCiPUM/RGIqwVk0Ghbmh5c2k="
global:
- secure: "HlmG8M2DmBUSBh6KH1yVIe/8gR4iibg4WfcHq1x/xYQxGbvleq7NOo04V6eFHnl9cvZCu+PKH0841WLnGR7c4BBf47GVu/o16nXzggPumHKy++lDzxFPlJ1faMDfjg/5vjbAxRUe7D3y98hQSeGHH4tedc8LvTaFLVu7iiGqvjU="
branches:
only:

View File

@ -8,7 +8,11 @@
# of patent rights can be found in the PATENTS file in the same directory.
cd ../../
git clone git://github.com/facebook/react-native.git react-native-gh-pages
if [ "$TRAVIS" ]; then
git clone "https://reactjs-bot@github.com/facebook/react-native.git" react-native-gh-pages
else
git clone git://github.com/facebook/react-native.git react-native-gh-pages
fi
cd react-native-gh-pages
git checkout origin/gh-pages
git checkout -b gh-pages