Skip to content

Commit 17ce305

Browse files
author
Vladimir Kotal
committed
add javadoc stage
1 parent e1d0c55 commit 17ce305

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,7 @@ jobs:
8080
if: repo = "oracle/opengrok" AND tag IS present
8181
script: dev/post-deploy.sh
8282
install: true
83+
- stage: javadoc
84+
name: Upload javadocs to Github pages
85+
script: dev/javadoc.sh
86+
install: true

dev/javadoc.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mvn -DskipTests=true site
6+
7+
git config --global user.email "[email protected]"
8+
git config --global user.name "travis-ci"
9+
git clone --quiet --branch=gh-pages \
10+
https://${GH_PAGES_TOKEN}@github.com/opengrok/opengrok gh-pages
11+
12+
cd gh-pages
13+
if [[ -d ./javadoc ]]; then
14+
git rm -rf ./javadoc
15+
fi
16+
cp -Rf ${TRAVIS_BUILD_DIR}/target/site/apidocs ./javadoc
17+
git add -f ./javadoc
18+
git commit -m "Lastest javadoc auto-pushed to gh-pages"
19+
git push -fq origin gh-pages

0 commit comments

Comments
 (0)