File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Upload javadocs to Github pages
2
2
3
- # TODO: do not run on tagged (release) build
4
3
on :
5
4
push:
6
5
branches:
28
27
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29
28
restore-keys: ${{ runner.os }}-m2
30
29
- name: Refresh Javadoc
30
+ env:
31
+ OPENGROK_REPO_SLUG: ${{ github.repository }}
32
+ OPENGROK_PULL_REQUEST: ${{ github.head_ref }}
33
+ OPENGROK_REF: ${{ github.ref }}
34
+ OPENGROK_BUILD_DIR : ${{ github.workspace }}
31
35
run: ./dev/javadoc.sh
Original file line number Diff line number Diff line change 3
3
set -e
4
4
set -x
5
5
6
- if [[ " ${TRAVIS_REPO_SLUG} " != " oracle/opengrok" ||
7
- " ${TRAVIS_PULL_REQUEST} " != " false" ||
8
- " ${TRAVIS_BRANCH} " != " master" ]]; then
6
+ if [[ -n $OPENGROK_REF && $OPENGROK_REF == refs/heads/* ]]; then
7
+ OPENGROK_BRANCH=${OPENGROK_REF# " refs/heads/" }
8
+ fi
9
+
10
+ if [[ " ${OPENGROK_REPO_SLUG} " != " oracle/opengrok" ||
11
+ -n " ${OPENGROK_PULL_REQUEST} " ||
12
+ " ${OPENGROK_BRANCH} " != " master" ]]; then
9
13
echo " Skipping Javadoc refresh"
10
14
exit 0
11
15
fi
@@ -24,7 +28,7 @@ cd "$BRANCH"
24
28
if [[ -d ./javadoc ]]; then
25
29
git rm -rf ./javadoc
26
30
fi
27
- cp -Rf ${TRAVIS_BUILD_DIR } /target/site/apidocs ./javadoc
31
+ cp -Rf ${OPENGROK_BUILD_DIR } /target/site/apidocs ./javadoc
28
32
git add -f ./javadoc
29
33
git commit -m " Lastest javadoc auto-pushed to branch $BRANCH "
30
34
git push -fq origin " $BRANCH "
You can’t perform that action at this time.
0 commit comments