Skip to content

Fix release docs still showing snapshot version on GitHub Pages - #126

Draft
carlspring with Copilot wants to merge 1 commit into
masterfrom
copilot/improve-documentation-versioning
Draft

Fix release docs still showing snapshot version on GitHub Pages#126
carlspring with Copilot wants to merge 1 commit into
masterfrom
copilot/improve-documentation-versioning

Conversation

Copilot AI commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

After a release, GitHub Pages continued to show the pre-release snapshot version (e.g. 1.0.0-rc-5-SNAPSHOT instead of 1.0.0-rc-5). The release: [published] trigger added in #125 was silently a no-op: GitHub Actions does not fire cross-workflow events when the triggering action uses GITHUB_TOKEN — so deploy-mkdocs.yaml never ran for releases.

Changes

create-release.yaml

  • Added pages: write and id-token: write permissions
  • Exposed release_version as a job output from the release job
  • Added a deploy-docs job (runs after release) that checks out the release tag, builds docs with DOCS_VERSION set to the tag, and deploys to GitHub Pages — self-contained within the same workflow, bypassing the GITHUB_TOKEN cross-trigger restriction:
deploy-docs:
  needs: release
  environment:
    name: github-pages
  steps:
    - uses: actions/checkout@v6
      with:
        ref: ${{ needs.release.outputs.release_version }}
    - run: docker compose run build
      env:
        DOCS_VERSION: ${{ needs.release.outputs.release_version }}
    - uses: actions/upload-pages-artifact@v4
    - uses: actions/deploy-pages@v4

deploy-mkdocs.yaml

  • Removed the non-functional release: [published] trigger and the associated "Determine docs version" step
  • This workflow now exclusively handles snapshot deployments on docs/**/** pushes to master, reading the version from pom.xml as before
Original prompt

This section details on the original issue you should resolve

<issue_title>Improve the versioning when publishing the documentation</issue_title>
<issue_description># Task Description

When the docs are published to GitHub Pages, use the release (tag) version.
When they are published from feature branches to Netlify, use the respective snapshot version.

Open Questions

Notes

Task List

The following tasks will need to be carried out:

  • Investigate the issue.
  • Provide a solution.
  • Test the fix.
  • Update the documentation.

Useful Commands

Incurred Costs

Task Relationships

This task:

Resources

Useful Links

Points of Contact

</issue_description>

Comments on the Issue (you are @copilot in this section)

@carlspring @copilot:

This did not work out for releases. It left the version as the snapshot. in fact it left it as the previous snapshot.

Image</comment_new>


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Improve versioning when publishing the documentation Fix release docs still showing snapshot version on GitHub Pages Mar 15, 2026
Copilot AI requested a review from carlspring March 15, 2026 14:48
… workflow

The root cause was that GitHub Actions suppresses cross-workflow triggers
when the initiating action uses GITHUB_TOKEN. The release: [published]
trigger in deploy-mkdocs.yaml was never fired when create-release.yaml
created the release via GITHUB_TOKEN.

Fix:
- create-release.yaml: add pages/id-token permissions, expose
  release_version as job output, add deploy-docs job that checks out
  the release tag and builds/deploys docs with DOCS_VERSION set to the
  release version
- deploy-mkdocs.yaml: remove non-functional release trigger and the
  associated Determine docs version step; keep only push-based snapshot
  deployment

Co-authored-by: carlspring <1436265+carlspring@users.noreply.github.com>
@carlspring
carlspring force-pushed the copilot/improve-documentation-versioning branch from c065e05 to afa852e Compare March 20, 2026 21:12
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.

Improve the versioning when publishing the documentation

2 participants