mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
5913dec6d7
Let's not say 'lastest'. That would only confuse non-native speakears such as yours truly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
32 lines
912 B
Bash
Executable File
32 lines
912 B
Bash
Executable File
#!/bin/bash
|
|
# This script was originally written by maxiaohao in the aws-mock GitHub project.
|
|
# https://github.com/treelogic-swe/aws-mock/
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
|
|
|
echo "Start to publish lastest Javadoc to gh-pages..."
|
|
|
|
cd build/
|
|
|
|
if test -d gh-pages
|
|
then
|
|
cd gh-pages
|
|
git pull
|
|
else
|
|
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/ReadyTalk/avian gh-pages > /dev/null
|
|
cd gh-pages
|
|
git config user.email "travis@travis-ci.org"
|
|
git config user.name "travis-ci"
|
|
fi
|
|
|
|
git rm -rf ./javadoc
|
|
cp -Rf ../javadoc ./javadoc
|
|
git add -f .
|
|
git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
|
|
if ! git push -fq origin gh-pages &> /dev/null; then
|
|
echo "Error pushing gh-pages to origin. Bad GH_TOKEN? GitHub down?"
|
|
else
|
|
echo "Done magic with auto publishment to gh-pages."
|
|
fi
|
|
fi
|