Repository navigation
ci: stamp the package version into the Pages site at deploy - #14
Merged
Merged
Conversation
The docs site source names no version. pages.yml now replaces the token __PACKAGE_VERSION__ in docs/site (JSON-LD softwareVersion and llms.txt) with the version from package.json and fails if a token is left. semantic-release commits the new version with the workflow token, which starts no push workflow, so Pages also redeploys on workflow_run after a successful "Release" run that a push to main triggered. The job checks out the default branch (no pull request code), keeps contents: read plus pages: write and id-token: write, and actions stay as they were. Checked with actionlint 1.7.12. Docs read 2026-11-20: GitHub "Events that trigger workflows" (workflow_run runs the default-branch workflow with GITHUB_SHA at the last default-branch commit; branches filter; check github.event.workflow_run.conclusion). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changes
The Pages site now shows the published version without the source ever hardcoding it.
docs/site/index.html(JSON-LDsoftwareVersion) anddocs/site/llms.txtcarry the token__PACKAGE_VERSION__.pages.ymlgets a step that replaces the token with thepackage.jsonversion before the upload. The step fails if any token is left.pages.ymlalso runs onworkflow_runafter the "Release" workflow onmaincompletes. semantic-release commits the new version with the workflow token, and that commit starts no push workflow, so without this the site would show the previous version.workflow_runonly if the release run succeeded and was triggered by a push tomain.Security
read, pageswrite, id-tokenwrite.Checks
actionlint1.7.12 onpages.yml: no findings.softwareVersionequal topackage.json, and no token is left inllms.txt.npm test, eslint andprettier --check .pass.Commit type
ci:, so no release.🤖 Generated with Claude Code