Skip to content

Commit

Permalink
GitHub pages working
Browse files Browse the repository at this point in the history
  • Loading branch information
BuddahLD committed Apr 16, 2019
1 parent ab19aa3 commit 83288ac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
35 changes: 22 additions & 13 deletions .ci/push-javadoc-to-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ generate_index_page() {
<h1>Virgil Security E3Kit JavaDoc</h1>
<p>&nbsp;</p>
<h2 style="color:#110B91B1;">User modules</h2>
<h2 style="color:#110B91B0;">User modules</h2>
<hr/>
<h3>E3Kit</h3>
<ul><li><a href="content/ethree-kotlin/${2}/index.html">${2}</a></li></ul>
<ul><li><a href="content/ethree-kotlin/${2}/ethree-kotlin/index.html">${2}</a></li></ul>
<h3>E3Kit Coroutines</h3>
<ul><li><a href="content/ethree-kotlin-coroutines/${3}/index.html">${3}</a></li></ul>
<ul><li><a href="content/ethree-kotlin-coroutines/${3}/ethree-kotlin-coroutines/index.html">${3}</a></li></ul>
<p>&nbsp;</p>
<h2 style="color:#110B91B1;">Internal modules</h2>
<hr/>
<h3>E3Kit Common</h3>
<ul><li><a href="content/ethree-common/${1}/index.html">${1}</a></li></ul>
<ul><li><a href="content/ethree-common/${1}/ethree-common/index.html">${1}</a></li></ul>
</div>
<p>&nbsp;</p>
Expand All @@ -99,10 +99,15 @@ generate_index_page() {
EOL
}

if [[ "$TRAVIS_REPO_SLUG" == "VirgilSecurity/virgil-e3kit-kotlin" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "dev" ]]; then
if [[ "$TRAVIS_REPO_SLUG" == "VirgilSecurity/virgil-e3kit-kotlin" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then

echo -e "Publishing javadoc...\n"

# Generate docs
./gradlew :ethree-common:javadocJar
./gradlew :ethree-kotlin:javadocJar
./gradlew :ethree-kotlin-coroutines:javadocJar

versionCommon="-1"
versionEthree="-1"
versionEthreeCoroutines="-1"
Expand All @@ -113,9 +118,13 @@ if [[ "$TRAVIS_REPO_SLUG" == "VirgilSecurity/virgil-e3kit-kotlin" ]] && [[ "$TRA
get_version "ethree-kotlin-coroutines/build.gradle" versionEthreeCoroutines

# Create each module docs temporary folder
cp -R ethree-common/build/javadoc/ $HOME/javadoc-latest/${versionCommon}/
cp -R ethree-kotlin/build/javadoc/ $HOME/javadoc-latest/${versionEthree}/
cp -R ethree-kotlin-coroutines/build/javadoc/ $HOME/javadoc-latest/${versionEthreeCoroutines}/
mkdir $HOME/javadoc-latest/
mkdir $HOME/javadoc-latest/${versionCommon}/
mkdir $HOME/javadoc-latest/${versionEthree}/
mkdir $HOME/javadoc-latest/${versionEthreeCoroutines}/
cp -R ethree-common/build/javadoc/. $HOME/javadoc-latest/${versionCommon}/
cp -R ethree-kotlin/build/javadoc/. $HOME/javadoc-latest/${versionEthree}/
cp -R ethree-kotlin-coroutines/build/javadoc/. $HOME/javadoc-latest/${versionEthreeCoroutines}/

# Get last gh-pages docs
cd $HOME
Expand All @@ -124,9 +133,9 @@ if [[ "$TRAVIS_REPO_SLUG" == "VirgilSecurity/virgil-e3kit-kotlin" ]] && [[ "$TRA
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/VirgilSecurity/virgil-e3kit-kotlin gh-pages > /dev/null

# Remove old docs
git rm gh-pages/index.html
git rm -rf gh-pages/content
cd gh-pages
git rm index.html
git rm -rf content

# Create main index page for all modules
versions=(${versionCommon} ${versionEthree} ${versionEthreeCoroutines})
Expand All @@ -137,9 +146,9 @@ if [[ "$TRAVIS_REPO_SLUG" == "VirgilSecurity/virgil-e3kit-kotlin" ]] && [[ "$TRA
mkdir content/ethree-common/
mkdir content/ethree-kotlin/
mkdir content/ethree-kotlin-coroutines/
mv -R $HOME/javadoc-latest/${versionCommon} content/ethree-common/
mv -R $HOME/javadoc-latest/${versionEthree} content/ethree-kotlin/
mv -R $HOME/javadoc-latest/${versionEthreeCoroutines} content/ethree-kotlin-coroutines/
mv $HOME/javadoc-latest/${versionCommon} content/ethree-common/
mv $HOME/javadoc-latest/${versionEthree} content/ethree-kotlin/
mv $HOME/javadoc-latest/${versionEthreeCoroutines} content/ethree-kotlin-coroutines/

# Add new docs to index and commit
git add -f .
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ env:
- ANDROID_EMULATOR_API=24
- ADB_INSTALL_TIMEOUT=5 # minutes
- ANDROID_ABI=default/armeabi-v7a
- secure: NC8K3/iSruYL3ooDqGJsC2zm89/IIQr0Gvf4kFv2USD22hYuGM1OH+bBfONs5SDQhIB53ZwCXAw+4vYMkiCPSa0gPCkdiznDUOeuj/kvYgIL9KdfM3PbOtsMcCUP+w3WEu8MGi+hrz4ym8W2Y6YU4bXIgRsKClPzRMI9ckPQTTmcAYlJYBzIy69YPPxl/wN/4mC5b5L53HG/hpQqGwOZZPC1P8FXgaIkx1mGQoBlQun723tcYw13F9Ej9lIQemQiU5R6LI/nxS0jSQUemOuMUxZGEcE/hYGWkdC95tQyrHQe4t/kPYzjG4ApDwlaP8ETNGFYbdYM3F8FnVgjZmSd/494nzybuqtGLJrGRo4uB4Vv+T2/fvFyUl/PXgLndx6Dw5AaNe2Bajf6uuwfWzPTUgzi/gVkCW354Kz0teUkjSL6vmOp8UvtBgALD8mkTE4RU8ty0dvYBC+DryYwk+0+3swk93LoOSXpO+X7rkmKS5CUFDS8XXR9bU6424hPUKV/biBbUi+dAm5p5i8G0pzy2d6ck0XIsSi4lsUUu9Ov+CETKTkJ5rkwe+uVBTB6KOeId2S5Avvrju7oAp0F9FUFE5ePXJkEchREZVw/t6KUPB7rCdyKtsVC6r7PYSTWTU0SSScDKK8kNcZJEsKp9ldEW3JwUJwXUkuI6DQN0xzkyq0=
- secure: Nz/+LNm9NO3PgvrwLIKDVjlJTskzZPKYXWnNe1T8kUflcQp6dygc9M3tqOgX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bFrgQ/2NwkMPSkMKr+/dKxnPvnWmo6uzqGSZwnLoGlnIryNPzIf8CZTsSWcl6dWxw7LYNMuPOVZGz4AMN8NKFqIrbl0sE3cr00z8N1FHwX2hD2D6dYRMpnv5l6N6ZxxKQT4BwmmpnFIIiKJyoNodUlgYtZX3iJICLQcpmHTrTle+h6XT24biUFF/uPO2TUGmhCEVzLgdlPvbiCePlAg1oytJIxmXjrmCJx/A=

android:
components:
Expand Down

0 comments on commit 83288ac

Please sign in to comment.