Skip to content

docs: JavaDoc site (javadoc branch + javadoc.io) - #10

Merged
Pinont merged 4 commits into
mainfrom
cursor/javadoc-docs-site-f59e
Sep 8, 2026
Merged

docs: JavaDoc site (javadoc branch + javadoc.io)#10
Pinont merged 4 commits into
mainfrom
cursor/javadoc-docs-site-f59e

Conversation

@Pinont

@Pinont Pinont commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Why

Ship public JavaDoc HTML for 2.0.0 and SNAPSHOT consumers. This repo’s GitHub Pages URL (https://pinont.github.io/SingularityLib/) is captured by the pinont.me custom domain, so JavaDoc is not published there.

After #12, publish-public-repo no longer git-pushes Pinont/singularity-maven. Nont confirmed there is no usable PAT (MAVEN_REPO_TOKEN is empty). maven.pinont.me is a frozen Pages archive. This PR does not resurrect that snapshot git-push and does not invent a new secret.

JavaDoc host decision

Audience Where docs are served
2.0.0 (release) javadoc.io/doc/io.github.pinont/singularitylib/2.0.0 (already live from Central)
SNAPSHOT / latest from main javadoc branch of this repo, pushed with GITHUB_TOKEN. Browse via jsDelivr or the branch tree. Also uploaded as the javadoc-html workflow artifact on every PR/main run.
javadoc jar Still attached by maven-javadoc-plugin (failOnError remains false) for Central / GitHub Packages
Not used maven.pinont.me/javadoc/ — preferred if a PAT with contents:write on Pinont/singularity-maven exists. It does not. Blocker left for Nont.
Not used GitHub Pages on this repo (portfolio / pinont.me domain)

The javadoc branch is populated only after merge to main (or workflow_dispatch). PR CI generates HTML and uploads the artifact; it does not push the branch.

What changed vs the original #10 patch

  • Merged main (ci: retire Pages snapshot push; use SONATYPE_* for Central #12 + docs: copy-paste examples for CommandGroup, conversations, and export #13). Conflict file: .github/workflows/pages-repo.yml — kept retired (dispatch-only no-op). release.yml taken from main (SONATYPE_USERNAME / SONATYPE_PASSWORD, release label gate). This PR does not have a release label and does not create tags.
  • publish-javadoc.yml no longer clones/pushes singularity-maven. It generates HTML, uploads an artifact, and (on main only) publishes the javadoc branch. Version output is trimmed with printf (Copilot review).
  • README: JavaDoc badge → javadoc.io; latest SNAPSHOT HTML → jsDelivr / javadoc branch. Snapshot jars: GitHub Packages is live; maven.pinont.me noted as frozen. #13 docs/examples/ paragraph kept.
  • Landing page docs/index.html matches that host story (copied onto the javadoc branch as /index.html).
  • CI unblock (unrelated to docs, required for green checks): pin paper-api to 26.2.build.111-stable. The old range [26.2.build,) resolved to Paper 26.3-pre-2 and broke MockBukkit 4.116.1 (RegistryAccessMock / decorated_pot_pattern).

Out of scope

  • No Central republish, no git tags, no GitHub release, no release label.
  • Wiki left stale on purpose.
  • No MAVEN_REPO_TOKEN wired.

Verify

  • mvn javadoc:javadoc produces target/site/apidocs/index.html.
  • mvn javadoc:jar still produces singularitylib-*-javadoc.jar.
  • mvn test — 95 tests pass against the pinned Paper 26.2 bundle.
  • Workflow YAML parses. PR CI should run publish-javadoc generate only (no branch push).
Open in Web Open in Cursor 

Generate API docs with javadoc:javadoc and copy them into
Pinont/singularity-maven under /javadoc/singularitylib/ so they
sit beside the snapshot Maven repo without using this repo's
GitHub Pages (that URL is the pinont.me portfolio).

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new publish workflow can silently succeed when version parsing or the Pages rebuild trigger fails, which can leave the hosted docs stale without failing CI.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a public, Maven-site-hosted JavaDoc documentation site for SingularityLib by generating JavaDoc HTML in CI and publishing it into the Pinont/singularity-maven gh-pages tree under /javadoc/singularitylib/, alongside a small landing page and updated README links.

Changes:

  • Add a landing page and redirect page under docs/ for the hosted JavaDoc site.
  • Add a new GitHub Actions workflow to build JavaDoc HTML and publish it to Pinont/singularity-maven (gh-pages) under /javadoc/singularitylib/.
  • Update README and Maven Javadoc plugin configuration to align with the new docs publishing flow.
File summaries
File Description
README.md Adds a docs badge and links to the hosted JavaDoc and fallback javadoc.io.
pom.xml Centralizes maven-javadoc-plugin configuration for jar + HTML generation behavior.
docs/javadoc-root.html Adds a lightweight redirect entry point for the /javadoc/ root.
docs/index.html Adds a styled landing page with install coordinates and JavaDoc links.
.github/workflows/publish-javadoc.yml New workflow to generate and publish JavaDoc HTML to the Pages-backed Maven repo.
.github/workflows/pages-repo.yml Adds concurrency coordination/comments to avoid racing with JavaDoc publishing.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/publish-javadoc.yml Outdated
Comment on lines +39 to +40
VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
Comment thread .github/workflows/publish-javadoc.yml Outdated
Comment on lines +108 to +111
curl -s -X POST \
-H "Authorization: Bearer ${{ secrets.MAVEN_REPO_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/Pinont/singularity-maven/pages/builds -o /dev/null -w "%{http_code}\n"
cursoragent and others added 2 commits September 8, 2026 02:45
Resolve the pages-repo.yml conflict by keeping publish-public-repo retired
(no singularity-maven git-push). Take main's release.yml (SONATYPE_* and
the release-label gate) and the docs/examples README paragraph.

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
MAVEN_REPO_TOKEN is empty, so do not git-push Pinont/singularity-maven.
Generate HTML in CI, upload it as an artifact, and publish the javadoc
branch with GITHUB_TOKEN. Point README at javadoc.io for 2.0.0 and
jsDelivr for latest-from-main.

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
@cursor cursor Bot changed the title docs: JavaDoc site on maven.pinont.me docs: JavaDoc site (javadoc branch + javadoc.io) Sep 8, 2026
The [26.2.build,) range resolved to 26.3-pre-2.build.0-alpha, which
breaks MockBukkit 4.116.1 (RegistryAccessMock / decorated_pot_pattern).
Pin to the 26.2 bundle MockBukkit was built against so tests run.

Co-authored-by: Nonnipat Tangrojjanakhajorn <contact@pinont.me>
@Pinont
Pinont merged commit c7b8441 into main Sep 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants