From 8e9684db4e6798708782d13212e7a0a3907b0f07 Mon Sep 17 00:00:00 2001 From: kronosapiens Date: Thu, 23 Apr 2026 10:23:00 -0400 Subject: [PATCH] ci: add docs-sync workflow to open PRs against dojoengine/book Ports the docs-sync workflow from cartridge-gg/controller to this repo. On each merged PR to main (and on manual workflow_dispatch), Claude analyzes the diff and, if user-facing behavior changed, opens an auto-merging PR to dojoengine/book with targeted docs updates. Canonical docs location: docs/pages/toolchain/torii/ Requires repository secrets: CREATE_PR_TOKEN, ANTHROPIC_API_KEY. --- .github/workflows/docs-sync.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/docs-sync.yml diff --git a/.github/workflows/docs-sync.yml b/.github/workflows/docs-sync.yml new file mode 100644 index 00000000..2a77648d --- /dev/null +++ b/.github/workflows/docs-sync.yml @@ -0,0 +1,38 @@ +name: docs-sync + +on: + pull_request: + types: [closed] + branches: [main] + workflow_dispatch: + inputs: + commit_sha: + description: "Commit SHA to analyze for documentation updates" + required: true + type: string + +jobs: + docs-sync: + if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + uses: dojoengine/book/.github/workflows/docs-sync.yml@main + with: + target-docs-repo: dojoengine/book + source-repo-slug: dojoengine/torii-core + diff-globs: | + *.rs + *.ts + *.tsx + *.proto + *.toml + *.md + docs-patterns: | + ^crates/.*\.rs$ + ^bins/.*\.rs$ + ^client/.*\.(ts|tsx)$ + ^torii\.js/.*\.(ts|tsx)$ + ^proto/ + canonical-desc: | + Torii is documented at docs-repo/docs/pages/toolchain/torii/ — this is the single canonical location for torii docs (server, indexer, GraphQL, gRPC, SQL). This repo (torii-core) implements the core indexing primitives used by the full torii indexer. + docs-structure-desc: | + The site uses Vocs. Content lives in `docs-repo/docs/pages/`. Navigation is in `docs-repo/routes.ts`. SDK docs at `docs-repo/docs/pages/client/sdk/` are single `.md` files (bevy.md, javascript.md, unity.md, unrealengine.md, godot.md, rust.md, telegram.md), not subdirectories — the sole exception is `c/` which is a subdir. + secrets: inherit