Problem
The wiki update workflow currently conflicts with protected main branch rules because it expects the generated wiki submodule reference to be committed directly after merge. That was the previous flow, but branch protection now prevents the workflow from updating the parent repository pointer on main in that shape.
Current Behavior
The packaged consumer workflow in resources/github-actions/wiki.yml only calls the reusable wiki workflow for pushes to main. This does not exercise the new PR preview flow and keeps consumers aligned with the branch-protection-sensitive publishing model.
Expected Behavior
When a pull request is opened, updated, reopened, or receives new pushes, the wiki workflow should generate Markdown docs into a PR-scoped wiki branch and commit the resulting .github/wiki submodule pointer back to the PR branch. When that pull request is merged into main, the workflow should publish the content from the PR wiki branch into the wiki main branch.
Failure Surface
.github/workflows/wiki.yml
resources/github-actions/wiki.yml
.github/wiki submodule pointer updates generated by wiki preview runs
- Consumer repositories that install the packaged workflow stub with
composer dev-tools:sync
Proposal
Adopt the new two-stage wiki workflow as the natural development flow and update the packaged consumer stub so it invokes the reusable workflow on pull request preview events and merged pull request publish events.
Implementation Strategy
Keep the reusable workflow logic in .github/workflows/wiki.yml and update resources/github-actions/wiki.yml to call it for:
pull_request events with opened, synchronize, and reopened activity types;
pull_request_target closed events, guarded by the reusable workflow so only merged pull requests targeting main publish to the wiki main branch;
workflow_dispatch for manual testing.
Preserve write permissions required for committing the wiki branch and parent repository submodule pointer while avoiding direct post-merge commits to protected main.
Non-goals
- Redesigning the wiki generator command or generated Markdown content.
- Changing branch protection settings.
- Replacing the
.github/wiki submodule model.
- Updating unrelated workflow stubs.
Acceptance Criteria
Functional Criteria
Regression Criteria
Architectural / Isolation Criteria
Problem
The wiki update workflow currently conflicts with protected
mainbranch rules because it expects the generated wiki submodule reference to be committed directly after merge. That was the previous flow, but branch protection now prevents the workflow from updating the parent repository pointer onmainin that shape.Current Behavior
The packaged consumer workflow in
resources/github-actions/wiki.ymlonly calls the reusable wiki workflow for pushes tomain. This does not exercise the new PR preview flow and keeps consumers aligned with the branch-protection-sensitive publishing model.Expected Behavior
When a pull request is opened, updated, reopened, or receives new pushes, the wiki workflow should generate Markdown docs into a PR-scoped wiki branch and commit the resulting
.github/wikisubmodule pointer back to the PR branch. When that pull request is merged intomain, the workflow should publish the content from the PR wiki branch into the wikimainbranch.Failure Surface
.github/workflows/wiki.ymlresources/github-actions/wiki.yml.github/wikisubmodule pointer updates generated by wiki preview runscomposer dev-tools:syncProposal
Adopt the new two-stage wiki workflow as the natural development flow and update the packaged consumer stub so it invokes the reusable workflow on pull request preview events and merged pull request publish events.
Implementation Strategy
Keep the reusable workflow logic in
.github/workflows/wiki.ymland updateresources/github-actions/wiki.ymlto call it for:pull_requestevents withopened,synchronize, andreopenedactivity types;pull_request_targetclosedevents, guarded by the reusable workflow so only merged pull requests targetingmainpublish to the wiki main branch;workflow_dispatchfor manual testing.Preserve write permissions required for committing the wiki branch and parent repository submodule pointer while avoiding direct post-merge commits to protected
main.Non-goals
.github/wikisubmodule model.Acceptance Criteria
Functional Criteria
.github/wikisubmodule pointer to the pull request branch when the generated wiki content changes.mainpublishes the PR wiki branch content to the wikimainbranch.main, does not publish to the wikimainbranch.resources/github-actions/wiki.ymlcalls the reusable workflow for the same PR preview and merged-PR publish events needed by consumer repositories.Regression Criteria
workflow_dispatchfor experimental validation.Architectural / Isolation Criteria
resources/github-actionsinstead of duplicating the reusable workflow implementation.