Skip to content

Commit 2c063fc

Browse files
committed
chore: clean up javadoc action
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
1 parent 4cfd3a2 commit 2c063fc

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
pages: write
3636

3737
steps:
38+
# Checkout the main and gh-pages branches. Main is used to generate the Javadoc, gh-pages stores the output Javadoc.
3839
- name: Checkout main branch
3940
uses: actions/checkout@v4
4041
with:

build/publishJavadoc-gha.sh

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
11
#!/bin/bash
22

3-
# set -e
3+
set -e
44

55
# Required environment variables:
66
# GITHUB_REPO_SLUG
77
# GITHUB_TAG
88

9-
printf "\n>>>>> [DEBUG] current dir...\n"
10-
pwd
11-
ls -la
12-
printf "\n>>>>> [/DEBUG] current dir...\n"
13-
149
printf "\n>>>>> Publishing javadoc for release build: repo=%s tag=%s\n" ${GITHUB_REPO_SLUG} ${GITHUB_TAG}
1510

16-
# printf "\n>>>>> Checking out gh-pages branch...\n"
17-
# git config --global user.email "github-actions[bot]@users.noreply.github.com"
18-
# git config --global user.name "github-actions[bot]"
19-
# # Checkout the gh-pages branch as a fresh copy of latest in main
20-
# git checkout -b gh-pages --no-guess
21-
# git status
22-
# printf "\n>>>>> Finished checking out...\n"
23-
2411
# Open the "main" dir, containing the checked out main branch
2512
pushd main
2613

2714
printf "\n>>>>> Generating Javadoc...\n"
2815
mvn -B versions:set -DnewVersion="${GITHUB_TAG}" -DgenerateBackupPoms=false
29-
mvn clean javadoc:aggregate --settings build/.github.settings.xml
16+
mvn -B -ntp clean javadoc:aggregate --settings build/.github.settings.xml
3017
printf "\n>>>>> Finished generating Javadoc...\n"
3118

32-
printf "\n>>>>> [DEBUG] ls -la...\n"
33-
ls -la
34-
printf "\n>>>>> [/DEBUG] ls -la...\n"
35-
3619
# Create a new directory for this branch/tag and copy the javadocs there.
3720
printf "\n>>>>> Copying javadocs to new directory: docs/%s\n" ${GITHUB_TAG}
3821
rm -rf ../gh-pages/docs/${GITHUB_TAG}

0 commit comments

Comments
 (0)