Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
auto-publish javadoc to github
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianziser committed Feb 18, 2017
1 parent e57082d commit 726f4b8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 23 additions & 0 deletions .travis/push-jdoc-gh-pages.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 726f4b8

Please sign in to comment.