ci: add reusable docs-sync workflow for the dojoengine ecosystem#504
Merged
kronosapiens merged 1 commit intomainfrom Apr 23, 2026
Merged
ci: add reusable docs-sync workflow for the dojoengine ecosystem#504kronosapiens merged 1 commit intomainfrom
kronosapiens merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Consolidates per-repo docs-sync workflows across the dojoengine ecosystem into a single reusable workflow hosted here. Callers (dojo, katana, torii, torii-core, saya, dojo.js, dojo.c, dojo.unity, dojo.unreal, dojo.bevy, and cartridge-gg/controller) invoke this via `uses:` and pass their repo-specific diff globs, DOCS_PATTERNS, canonical docs path, and target docs repo. Because this file lives in a public repo, cross-org callers (e.g., cartridge-gg/controller) can invoke it without special access configuration. Callers forward their own CREATE_PR_TOKEN and ANTHROPIC_API_KEY via `secrets: inherit`.
492d25a to
c5d52cf
Compare
tarrencev
pushed a commit
to cartridge-gg/controller
that referenced
this pull request
Apr 24, 2026
Replaces the in-tree docs-sync workflow with a minimal stub that invokes the shared reusable workflow hosted in `dojoengine/book`. ## Why The docs-sync logic has been duplicated across 10+ source repos (dojo, katana, torii, torii-core, saya, dojo.js, dojo.c, dojo.unity, dojo.unreal, dojo.bevy, and this one). Any improvement to prompt rules, diff handling, or PR creation had to be applied in 11 places. This migration consolidates the pipeline into a single reusable workflow (`dojoengine/book/.github/workflows/docs-sync.yml`) and leaves each caller with a ~30-line stub. ## Cross-org reuse works `dojoengine/book` is **public**, so `cartridge-gg/controller` can invoke `uses: dojoengine/book/.github/workflows/docs-sync.yml@main` with no access-setting changes. Controller keeps its own `CREATE_PR_TOKEN` and `ANTHROPIC_API_KEY`; they're forwarded to the reusable workflow via `secrets: inherit`. ## What changed - `.github/workflows/docs-sync.yml` shrinks from ~180 lines to ~20. - All pipeline logic (diff computation, `DOCS_PATTERNS` filter, `claude-code-action` invocation, docs-PR branch/commit/auto-merge) moves to the reusable workflow. Behavior is unchanged. - Per-repo variation passed via `with:`: - `target-docs-repo: cartridge-gg/docs` - `source-repo-slug: cartridge-gg/controller` - `diff-globs`, `docs-patterns`, `canonical-desc`, `docs-structure-desc` ## Merge order **Requires `dojoengine/book#504` to land first** — that PR adds the reusable workflow this stub references. Merging this before that means the `uses:` ref won't resolve at trigger time. ## Related Companion stubs across the dojoengine ecosystem: - dojoengine/dojo#3405, katana#552, torii#427, torii-core#68, saya#71, dojo.js#528, dojo.c#165, dojo.unity#117, dojo.unreal#2, dojo.bevy#6.
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.
Adds a single reusable workflow at
.github/workflows/docs-sync.ymlthat consolidates the per-repo docs-sync workflows across the dojoengine ecosystem pluscartridge-gg/controller.Why here
dojoengine/bookis the natural home: it's the primary target docs repo, and it's public, which means cross-org callers (cartridge-gg/controller→cartridge-gg/docs) can invoke it without any access-setting juggling.How callers use it
Each source repo shrinks from ~200 lines of duplicated workflow to a ~30-line stub:
Inputs
target-docs-repodojoengine/book,cartridge-gg/docs)source-repo-slugdojoengine/katana). Short name is derived as${slug##*/}— no separate name input needed.diff-globsgit diff --docs-patternscanonical-descdocs-structure-descSecrets are forwarded via
secrets: inherit— each caller keeps its ownCREATE_PR_TOKENandANTHROPIC_API_KEY, no new secrets land in this repo.What the reusable workflow does
Same pipeline as the previously-per-repo versions:
commit_sha).docs-patterns— if nothing matches, exits.anthropics/claude-code-action@betawith a tight ruleset (default to no changes, single canonical location, minimal edits, one code example per concept, never create new top-level sections).docs-update-<timestamp>on the target docs repo, commits, opens an auto-merging PR back-linking to the source PR.Related PRs
Once this merges, these existing per-repo PRs will have the stubs take effect:
Sourced from
cartridge-gg/controller/.github/workflows/docs-sync.ymlwith all per-repo variation extracted toworkflow_callinputs.