Skip to content

chore: fix the Javadocs publishing action#81

Merged
briangleeson merged 14 commits intomainfrom
publishTesting
Mar 9, 2026
Merged

chore: fix the Javadocs publishing action#81
briangleeson merged 14 commits intomainfrom
publishTesting

Conversation

@briangleeson
Copy link
Copy Markdown
Member

PR summary

Originally the publishJavadoc-gha.sh script 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 main branch and gh-pages branch into two different folders. This approach seems to better propagate the correct GH permissions and solves the problem when pushing to the gh-pages branch.

The github action to publish the Javadoc uses the content of the main branch to generate the docs, and then copies them over to the gh-pages folder. From there it creates a commit and pushes to the gh-pages branch in the repo. This allows us to build the docs off the latest codebase in main, whilst preserving all previous javadoc builds in the gh-pages branch (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:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

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>
Copy link
Copy Markdown
Member

@jerh616 jerh616 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@briangleeson briangleeson merged commit 2c063fc into main Mar 9, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

🎉 This PR is included in version 2.0.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants