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+
914printf " \n>>>>> Publishing javadoc for release build: repo=%s tag=%s\n" ${GITHUB_REPO_SLUG} ${GITHUB_TAG}
1015
11- printf " \n>>>>> Checking out gh-pages branch...\n"
12- git config --global user.email " github-actions[bot]@users.noreply.github.com"
13- git config --global user.name " github-actions[bot]"
14- # Checkout the gh-pages branch as a fresh copy of latest in main
15- git checkout -b gh-pages --no-guess
16- git status
17- printf " \n>>>>> Finished checking out...\n"
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+
24+ # Open the "main" dir, containing the checked out main branch
25+ pushd main
1826
1927printf " \n>>>>> Generating Javadoc...\n"
2028mvn -B versions:set -DnewVersion=" ${GITHUB_TAG} " -DgenerateBackupPoms=false
2129mvn clean javadoc:aggregate --settings build/.github.settings.xml
2230printf " \n>>>>> Finished generating Javadoc...\n"
2331
24- printf " \n>>>>> [DEBUG] current dir contents ...\n"
32+ printf " \n>>>>> [DEBUG] ls -la ...\n"
2533ls -la
26- printf " \n>>>>> [/DEBUG] current dir contents ...\n"
34+ printf " \n>>>>> [/DEBUG] ls -la ...\n"
2735
2836# Create a new directory for this branch/tag and copy the javadocs there.
2937printf " \n>>>>> Copying javadocs to new directory: docs/%s\n" ${GITHUB_TAG}
30- rm -rf docs/${GITHUB_TAG}
31- mkdir -p docs/${GITHUB_TAG}
32- cp -rf target/site/apidocs/* docs/${GITHUB_TAG}
38+ rm -rf ../gh-pages/docs/${GITHUB_TAG}
39+ mkdir -p ../gh-pages/docs/${GITHUB_TAG}
40+ cp -rf target/site/apidocs/* ../gh-pages/docs/${GITHUB_TAG}
41+
42+ # Return to root dir, then open "gh-pages" dir
43+ popd
44+ pushd gh-pages
3345
3446printf " \n>>>>> Generating gh-pages index.html...\n"
3547build/generateJavadocIndex.sh > index.html
@@ -42,4 +54,6 @@ printf "\n>>>>> Committed changes...\n"
4254git push -f origin gh-pages
4355printf " \n>>>>> Pushed changes...\n"
4456
57+ popd
58+
4559printf " \n>>>>> Published javadoc for release build: repo=%s tag=%s\n" ${GITHUB_REPO_SLUG} ${GITHUB_TAG}
0 commit comments