chore: fix the Javadocs publishing action#81
Merged
briangleeson merged 14 commits intomainfrom Mar 9, 2026
Merged
Conversation
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Signed-off-by: BRIAN GLEESON <Brian.Gleeson@ie.ibm.com>
Contributor
|
🎉 This PR is included in version 2.0.7 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
Originally the
publishJavadoc-gha.shscript was based on the version used by our old Travis builds to publish the Javadoc. Though that had never actually worked. After migrating to Github Actions, found that the script couldnt merge the commit to main branch, despite removing branch protection and testing various approaches to solve what seemed to be an authentication issue.Solution
Reworked the script so that it does not clone the repo (and gh-pages branch) within the script itself. Instead there are two GHA steps to checkout the
mainbranch andgh-pagesbranch into two different folders. This approach seems to better propagate the correct GH permissions and solves the problem when pushing to thegh-pagesbranch.The github action to publish the Javadoc uses the content of the
mainbranch to generate the docs, and then copies them over to thegh-pagesfolder. From there it creates a commit and pushes to thegh-pagesbranch in the repo. This allows us to build the docs off the latest codebase inmain, whilst preserving all previous javadoc builds in thegh-pagesbranch (in the docs subdirectory).This reworking also required moving the maven commands into the publishJavadoc script, instead of calling them as GHA steps. It also means we no longer need to pass the GH_TOKEN or GITHUB_TOKEN into the script as the auth is persisted from the checkout steps.
PR Checklist
Please make sure that your PR fulfills the following requirements:
PR Type
What is the current behavior?
What is the new behavior?
Does this PR introduce a breaking change?