Skip to content

docs: derive site version from the latest GitHub release#563

Open
aryasadeghi1 wants to merge 1 commit into
Azure:devfrom
aryasadeghi1:docs-version-from-release
Open

docs: derive site version from the latest GitHub release#563
aryasadeghi1 wants to merge 1 commit into
Azure:devfrom
aryasadeghi1:docs-version-from-release

Conversation

@aryasadeghi1

Copy link
Copy Markdown
Member

The version chip in the docs header rendered site.version, a string hard-coded in docs/_config.yml that had to be bumped by hand every release.

Update

Read the version from site.github.latest_release instead and drop the config key. That metadata comes from jekyll-github-metadata, which GitHub Pages always has enabled. Local builds without a token resolve it to nothing, so the header hides the chip instead of showing an empty value.

Pages only rebuilds on a push to its source branch, and the release is published after that push, so add a step to the release job that requests a Pages rebuild once the release exists. It has to live in that job: a release created with GITHUB_TOKEN doesn't emit an event that a separate workflow could trigger on.

Closes #561

The version chip in the docs header rendered site.version, a string
hard-coded in docs/_config.yml that had to be bumped by hand every
release. It drifts: dev currently carries v4.6.1 while the latest release
is v4.6.0, so the published site advertises a version that isn't out yet.

Read the version from site.github.latest_release instead and drop the
config key. That metadata comes from jekyll-github-metadata, which GitHub
Pages always has enabled. Local builds without a token resolve it to
nothing, so the header hides the chip instead of showing an empty value.

Pages only rebuilds on a push to its source branch, and the release is
published after that push, so add a step to the release job that requests
a Pages rebuild once the release exists. It has to live in that job: a
release created with GITHUB_TOKEN doesn't emit an event that a separate
workflow could trigger on.

Closes Azure#561
@aryasadeghi1
aryasadeghi1 requested a review from necusjz July 17, 2026 07:26
@aryasadeghi1 aryasadeghi1 self-assigned this Jul 17, 2026
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.

Automate docs site version in _config.yml instead of hard-coding it

2 participants