Skip to content

ci: merge generated docs PRs from the docs workflow - #1806

Merged
dkhawk merged 1 commit into
mainfrom
ci/merge-docs-prs
Oct 1, 2026
Merged

dkhawk merged 1 commit into
mainfrom
ci/merge-docs-prs

Conversation

@kikoso

@kikoso kikoso commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Update documentation workflow opens a docs: Update docs PR against gh-pages and labels it automerge, but nothing acts on that label. Every docs PR so far has been merged by hand, sometimes days after the release.

Fix

Give the create-pull-request step an id and add a step that merges the PR it created with gh pr merge --squash --delete-branch, using the same bot token.

  • This does not depend on a pull_request workflow, which would have to live on gh-pages to run for these PRs.
  • gh-pages has no branch protection or rulesets, so no approval is needed.
  • The step only runs when create-pull-request returns a PR number, so a release with no docs changes is a no-op.

Trade-off: generated docs go live without a human looking at them, which is effectively what happens today when the PR is merged without review.

Testing

The workflow YAML parses. The merge step only runs on a release or a manual dispatch, so it will first be exercised on the next release.

The docs PR targets gh-pages and only carried an automerge label that
nothing acted on, so every docs PR was merged by hand. Merge it right
after creating it instead.
@kikoso
kikoso marked this pull request as ready for review October 1, 2026 11:15
@kikoso
kikoso requested a review from a team as a code owner October 1, 2026 11:15
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 56.95% 🍏

There is no coverage information present for the Files changed

@dkhawk dkhawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkhawk
dkhawk merged commit 2bd91d5 into main Oct 1, 2026
12 checks passed
@dkhawk
dkhawk deleted the ci/merge-docs-prs branch October 1, 2026 12:57
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.

3 participants