diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 69b26f53..f4e8f37a 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -14,10 +14,12 @@ on: - 'reme/config/default.yaml' - 'integrations/claude_code/README.md' - 'integrations/hermes_agent/README.md' + - 'integrations/hermes_agent/figures/**' - 'reme_studio/**' - 'integrations/dsh/README*.md' - 'integrations/dsh/figures/**' - 'integrations/openclaw/README*.md' + - 'integrations/openclaw/figures/**' - 'plugins/*/README*.md' - 'benchmark/*/README*.md' - 'benchmark/toolmemory/gitcha.png' diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 521a954e..29323a8e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,12 +9,14 @@ on: - "reme/config/default.yaml" - "integrations/claude_code/README.md" - "integrations/hermes_agent/README.md" + - "integrations/hermes_agent/figures/**" - "README.md" - "README_ZH.md" - "reme_studio/**" - "integrations/dsh/README*.md" - "integrations/dsh/figures/**" - "integrations/openclaw/README*.md" + - "integrations/openclaw/figures/**" - "plugins/*/README*.md" - "benchmark/*/README*.md" - "benchmark/toolmemory/gitcha.png" diff --git a/github-pages/scripts/generate-content.mjs b/github-pages/scripts/generate-content.mjs index cd3d0e85..5435be7a 100644 --- a/github-pages/scripts/generate-content.mjs +++ b/github-pages/scripts/generate-content.mjs @@ -60,9 +60,15 @@ const externalDocumentRewrites = { ], "integrations/openclaw/README.md": [ ["(./README_ZH.md)", "(/zh/integrations/openclaw)"], + ["(./figures/", "(/figures/openclaw/"], ], "integrations/openclaw/README_ZH.md": [ ["(./README.md)", "(/en/integrations/openclaw)"], + ["(./figures/", "(/figures/openclaw/"], + ], + "integrations/hermes_agent/README.md": [ + ["(README_ZH.md)", "(/zh/integrations/hermes)"], + ["(figures/", "(/figures/hermes/"], ], "reme_studio/README.md": [ ["(./README_ZH.md)", "(/zh/workspace/studio)"], @@ -235,6 +241,12 @@ for (const [destination, source] of externalDocuments) { await cp(path.join(repoDir, "integrations/dsh/figures"), path.join(outputDir, "public/figures/dsh"), { recursive: true, }); +await cp(path.join(repoDir, "integrations/openclaw/figures"), path.join(outputDir, "public/figures/openclaw"), { + recursive: true, +}); +await cp(path.join(repoDir, "integrations/hermes_agent/figures"), path.join(outputDir, "public/figures/hermes"), { + recursive: true, +}); await cp(path.join(repoDir, "reme_studio/figures"), path.join(outputDir, "public/figures/studio"), { recursive: true, }); diff --git a/github-pages/tests/generated-content.test.mjs b/github-pages/tests/generated-content.test.mjs index 29297c4c..dbdc5978 100644 --- a/github-pages/tests/generated-content.test.mjs +++ b/github-pages/tests/generated-content.test.mjs @@ -89,6 +89,24 @@ test("publishes Studio screenshots with site-safe links", async () => { assert.match(chinese, /\(\/en\/workspace\/studio\)/); }); +test("publishes OpenClaw and Hermes integration figures with site-safe links", async () => { + for (const [page, integration] of [ + ["en/integrations/openclaw.md", "openclaw"], + ["zh/integrations/openclaw.md", "openclaw"], + ["en/integrations/hermes.md", "hermes"], + ]) { + const content = await readFile(path.join(generatedDir, page), "utf8"); + const images = [...content.matchAll(/!\[[^\]]*\]\(([^)]+)\)/g)]; + assert.ok(images.length, `${page}: screenshots must exist`); + for (const [, source] of images) { + assert.ok(source.startsWith(`/figures/${integration}/`), `${page}: ${source}`); + await access(path.join(generatedDir, "public", source.slice(1))); + } + } + const hermesEnglish = await readFile(path.join(generatedDir, "en/integrations/hermes.md"), "utf8"); + assert.match(hermesEnglish, /\(\/zh\/integrations\/hermes\)/); +}); + test("keeps Studio source READMEs portable for package registries", async () => { for (const name of ["README.md", "README_ZH.md"]) { const source = await readFile(path.join(repoDir, "reme_studio", name), "utf8"); @@ -142,9 +160,11 @@ test("tracks every generated input in documentation CI and deployment", async () "reme/config/default.yaml", "integrations/claude_code/README.md", "integrations/hermes_agent/README.md", + "integrations/hermes_agent/figures/**", "integrations/dsh/README*.md", "integrations/dsh/figures/**", "integrations/openclaw/README*.md", + "integrations/openclaw/figures/**", "reme_studio/**", "benchmark/toolmemory/gitcha.png", ];