chore(ci): Automate documentation release pipeline#3492
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a Python script .ci/update_docs_versions.py to automate updating documentation versions in the Hugo configuration file (hugo.cloudflare.toml). The script inserts new version blocks and prunes older ones to keep a maximum of eight versions. The review feedback recommends improving the robustness of the regular expressions used: first, by escaping the version string to prevent dots from being treated as wildcards, and second, by using a more flexible pattern to match the version blocks regardless of field order or formatting.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
|
||
| - name: Commit and Push Changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" |
There was a problem hiding this comment.
We can't use the Github action bot to commit changes since it can not sign the CLA (go/cla). @twishabansal has a solution to update the release please PR using that identity
There was a problem hiding this comment.
Updated to release please bot, similar to https://github.com/gemini-cli-extensions/cloud-sql-postgresql/blob/38ab73d23d58342ea046d1163ddc9f1a83d13303/.github/workflows/skills-generate.yml#L52
Automates the manual release pipeline of updating Hugo version dropdown configurations during the release process.
Background
Currently, when a new release is prepared (via a
release-pleasePR), a maintainer has to manually edit.hugo/hugo.cloudflare.tomlto add the new version block and prune the oldest version from the Cloudflare configuration. This PR introduces a automation pipeline to handle this seamlessly.Changes
cmd/version.txt).hugo.cloudflare.toml, it automatically prunes the oldest version, keeping the list capped at exactly 8 versions (dev+ the 7 most recent releases).release-pleaseand commits/pushes the version updates directly back into the release PR branch.workflow_dispatch): Allows maintainers to run the workflow manually on any branch (e.g.mainor a release branch) with an optional version input.