diff --git a/.travis.yml b/.travis.yml index 55859a6f..9c71b325 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,19 +7,25 @@ before_install: before_script: gpg --fast-import codesigning.asc script: mvn package -P build-extras deploy: - provider: releases - api_key: - secure: YR8aDGTciBNQgI8GU5DSSm6dzKyZhgmixewIMkbjwrGkdLs/UnD2cfMh2ziNuivpmnIDj2rCMmf6gr1PhQno5nsPPrrFcJs0tIv2LAvAAJst/k32zMK3wv1x54eaTS3SK9VxUdAcnB0N3RvMKLiaqkwTcxa4PY9pWlHnZdc8h9oCqr7JAq8NH/94Ri4AiUc7hDgu6xnZNDqll6gJwdM8kUPQuUsAkkAl2dBVfqB7OeQFkmTvl6Hi5WCn9zbpBpKxE4t/SbgZvH5ccVBKOZveFG38/Mm1ur6VHQ8WvZFnEHps+aq8Sjz8irzcdGHC/hSGvMfsB2LRZHKd8KaRcSCypzuBjNt+ayEaaCd4AcNIsR/cEtC9aOzttNhS6eX4YpdaDjmvlqChjKvR+reKVXK7rb6Z08vHkJC1HOofovfjBP0RXT/O1CsUTpPS0lpNfrNZ0n0GfaHqtqxYrGDsXMFIHX5v39fqwAF2pmpJQaB3CeSLpEM7YbNcPlPRQ/w4XZ5SEN1ENS6a8oenOL+IZNMyspTywG3vQgdc82W5MhjFpUawrReeWd6y5xrHiWBLVPJGsgJQPIY0MkuAGiIGqiT8hSW8x8frYhX9IZ7/x4My6PYL8pCv+zn2V8LBr5KCtjVf3sGrxftlt1eLvQHkw290yRUgcfTAd2Dj8lk8H+jYgXA= - file_glob: true - file: - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*.jar" - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*.jar.asc" - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-sources.jar" - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-sources.jar.asc" - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-javadoc.jar" - - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-javadoc.jar.asc" - skip_cleanup: true - on: - tags: true - repo: iotaledger/iota.lib.java - all_branches: true + - provider: releases + api_key: + secure: YR8aDGTciBNQgI8GU5DSSm6dzKyZhgmixewIMkbjwrGkdLs/UnD2cfMh2ziNuivpmnIDj2rCMmf6gr1PhQno5nsPPrrFcJs0tIv2LAvAAJst/k32zMK3wv1x54eaTS3SK9VxUdAcnB0N3RvMKLiaqkwTcxa4PY9pWlHnZdc8h9oCqr7JAq8NH/94Ri4AiUc7hDgu6xnZNDqll6gJwdM8kUPQuUsAkkAl2dBVfqB7OeQFkmTvl6Hi5WCn9zbpBpKxE4t/SbgZvH5ccVBKOZveFG38/Mm1ur6VHQ8WvZFnEHps+aq8Sjz8irzcdGHC/hSGvMfsB2LRZHKd8KaRcSCypzuBjNt+ayEaaCd4AcNIsR/cEtC9aOzttNhS6eX4YpdaDjmvlqChjKvR+reKVXK7rb6Z08vHkJC1HOofovfjBP0RXT/O1CsUTpPS0lpNfrNZ0n0GfaHqtqxYrGDsXMFIHX5v39fqwAF2pmpJQaB3CeSLpEM7YbNcPlPRQ/w4XZ5SEN1ENS6a8oenOL+IZNMyspTywG3vQgdc82W5MhjFpUawrReeWd6y5xrHiWBLVPJGsgJQPIY0MkuAGiIGqiT8hSW8x8frYhX9IZ7/x4My6PYL8pCv+zn2V8LBr5KCtjVf3sGrxftlt1eLvQHkw290yRUgcfTAd2Dj8lk8H+jYgXA= + file_glob: true + file: + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*.jar" + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*.jar.asc" + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-sources.jar" + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-sources.jar.asc" + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-javadoc.jar" + - "/home/travis/build/iotaledger/iota.lib.java/target/jota*-javadoc.jar.asc" + skip_cleanup: true + on: + tags: true + repo: iotaledger/iota.lib.java + all_branches: true + - provider: script + script: .travis/push-jdoc-gh-pages.sh + on: + tags: true + repo: iotaledger/iota.lib.java + all_branches: true \ No newline at end of file diff --git a/.travis/push-jdoc-gh-pages.sh b/.travis/push-jdoc-gh-pages.sh new file mode 100644 index 00000000..3c6a83eb --- /dev/null +++ b/.travis/push-jdoc-gh-pages.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ "$TRAVIS_REPO_SLUG" == "iotaledger/iota.lib.java" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + + echo -e "Publishing javadoc...\n" + + cp -R "/home/travis/build/iotaledger/iota.lib.java/target/apidocs/" $HOME/javadoc-latest + + cd $HOME + git config --global user.email "travis@travis-ci.org" + git config --global user.name "travis-ci" + git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/iotaledger/iota.lib.java gh-pages > /dev/null + + cd gh-pages + git rm -rf ./javadoc + cp -Rf $HOME/javadoc-latest ./javadoc + git add -f . + git commit -m "Latest javadoc on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" + git push -fq origin gh-pages > /dev/null + + echo -e "Published Javadoc to gh-pages.\n" + +fi \ No newline at end of file