Skip to content

Commit 4f910ed

Browse files
committed
chore: simplify javadoc script
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
1 parent 18c4665 commit 4f910ed

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

build/publishJavadoc-gha.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ rm -fr ./gh-pages
1717
git config --global user.email "github-actions[bot]@users.noreply.github.com"
1818
git config --global user.name "github-actions[bot]"
1919
# git clone --branch=gh-pages https://${GH_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages
20-
git clone --branch=gh-pages https://github.com/${GITHUB_REPO_SLUG}.git gh-pages
20+
# git clone --branch=gh-pages https://github.com/${GITHUB_REPO_SLUG}.git gh-pages
21+
git checkout -b gh-pages origin/gh-pages
2122
# TODO For now using a hardcoded token in the repo settings secrets, tied to brian.gleeson@ie.ibm.com
2223
# git clone --branch=gh-pages https://${GH_TOKEN}@github.com/${GITHUB_REPO_SLUG}.git gh-pages
2324
printf "\n>>>>> Finished cloning...\n"
2425

25-
pushd gh-pages
26+
# pushd gh-pages
2627

2728
# Create a new directory for this branch/tag and copy the javadocs there.
2829
printf "\n>>>>> Copying javadocs to new directory: docs/%s\n" ${GITHUB_TAG}
@@ -39,9 +40,9 @@ printf "\n>>>>> Added files...\n"
3940
git commit -m "docs: latest javadoc for ${GITHUB_TAG}"
4041
printf "\n>>>>> Committed changes...\n"
4142
git remote -v
42-
git push -f origin gh-pages
43+
git push origin gh-pages
4344
printf "\n>>>>> Pushed changes...\n"
4445

45-
popd
46+
# popd
4647

4748
printf "\n>>>>> Published javadoc for release build: repo=%s tag=%s\n" ${GITHUB_REPO_SLUG} ${GITHUB_TAG}

0 commit comments

Comments
 (0)