From d7cbc61b2371123a917243c79a72125a37834e65 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 8 Aug 2026 22:34:06 +0200 Subject: [PATCH] Take the publish branch from the POM, not the workflow The workflow forced -Dscmpublish.scm.branch=gh-pages. That is right for project sites but wrong for codehaus-plexus.github.io: an organisation page is served from master, and that repository's POM correctly sets scmBranch to master. Forcing gh-pages would have overridden it and published the site to a branch nobody serves - silently, since the build would have succeeded. Parent 26 already sets gh-pages in pluginManagement, so every project site keeps the same target as before and nothing else changes. Same principle as content, which is also left to the POM. --- .github/workflows/site.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 0a6ae5f..9f4dfe2 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -93,6 +93,11 @@ jobs: # The POMs set pubScmUrl from scm.developerConnection, which is an ssh URL and # cannot authenticate here. Rewrite it to https and let the job token supply the # credential, so the token stays out of the command line and the process list. + # + # Only pubScmUrl is overridden. The target branch comes from the POM: the parent + # sets gh-pages, and codehaus-plexus.github.io overrides it to master because an + # organisation page is served from there. Forcing gh-pages here would silently + # publish that site to a branch nobody serves. env: GH_TOKEN: ${{ github.token }} run: | @@ -105,6 +110,5 @@ jobs: ./mvnw ${{ inputs.maven_args }} \ ${{ inputs.multi-module && 'site site:stage scm-publish:publish-scm' || 'site-deploy' }} \ "-Dscmpublish.pubScmUrl=scm:git:https://github.com/${{ github.repository }}.git" \ - "-Dscmpublish.scm.branch=gh-pages" \ "-Dscmpublish.dryRun=${{ inputs.dry-run }}" \ "-Dscmpublish.checkinComment=Site checkin for ${{ github.repository }}@${{ github.sha }}"