File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 28
28
path : ~/.m2
29
29
key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
30
30
restore-keys : ${{ runner.os }}-m2
31
+ - name : Checkout gh-pages branch
32
+ uses : actions/checkout@v2
33
+ with :
34
+ ref : gh-pages
35
+ path : gh-pages
31
36
- name : Refresh Javadoc
32
37
env :
33
38
OPENGROK_REPO_SLUG : ${{ github.repository }}
Original file line number Diff line number Diff line change 3
3
set -e
4
4
set -x
5
5
6
+ if [[ -z " $OPENGROK_BUILD_DIR " ]]; then
7
+ echo -e " empty OPENGROK_BUILD_DIR"
8
+ exit 1
9
+ fi
10
+
6
11
if [[ -n $OPENGROK_REF && $OPENGROK_REF == refs/heads/* ]]; then
7
12
OPENGROK_BRANCH=${OPENGROK_REF# " refs/heads/" }
8
13
fi
@@ -22,14 +27,12 @@ echo -e "Building Javadoc...\n"
22
27
echo -e " Publishing javadoc to $BRANCH ...\n"
23
28
git config --global user.name " github-actions[bot]"
24
29
git config --global user.email " 41898282+github-actions[bot]@users.noreply.github.com"
25
- git clone --quiet --branch=$BRANCH \
26
- https://github.com/oracle/opengrok " $BRANCH "
27
30
28
31
cd " $BRANCH "
29
32
if [[ -d ./javadoc ]]; then
30
33
git rm -rf ./javadoc
31
34
fi
32
- cp -Rf ${ OPENGROK_BUILD_DIR} /target/site/apidocs ./javadoc
35
+ cp -Rf " $ OPENGROK_BUILD_DIR /target/site/apidocs" ./javadoc
33
36
git add -f ./javadoc
34
37
git commit -m " Lastest javadoc auto-pushed to branch $BRANCH "
35
38
git push -fq origin " $BRANCH "
You can’t perform that action at this time.
0 commit comments