Skip to content

Commit

Permalink
Autobuild website on Travis
Browse files Browse the repository at this point in the history
Had to change around the config since this is now a public repo so we
can't use SSH auth. This seems to work though.
  • Loading branch information
sophiebits committed Mar 28, 2015
1 parent 4ddd4af commit 3b73a0f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion website/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/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
Expand Down

0 comments on commit 3b73a0f

Please sign in to comment.