fix(docs): publish OpenClaw and Hermes integration figures (#586)
Some checks are pending
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / Build documentation (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run

* fix(docs): publish OpenClaw and Hermes integration figures

The generated /en/integrations/openclaw, /zh/integrations/openclaw and
/en/integrations/hermes pages are built from the plugin READMEs, which
reference local figures/. Only the dsh and Studio READMEs had their
./figures/ links rewritten to site paths and their figure directories
copied into the build, so every screenshot on those three pages resolved
to /<language>/integrations/figures/*.png and 404'd. verify-build.mjs
only checks <a> links, never <img> sources, so the build stayed green.

Mirror the dsh pattern: rewrite the figure links to /figures/openclaw/
and /figures/hermes/, copy both figure directories into public/figures/,
add the missing language-cross link for the Hermes page, and cover all of
it in the generated-content tests.

* ci(docs): watch the new integration figure directories

The figures this PR adds under integrations/hermes_agent/figures/ and
integrations/openclaw/figures/ were not in either docs workflow's path
filter, so a follow-up commit that only touches a PNG would skip the docs
build and the broken-reference tests. Add both globs to the pull_request
filter in ci-docs.yml and the push filter in deploy-docs.yml, matching how
integrations/dsh/figures/** and reme_studio/figures/** are already listed.

Requested in review on #586.

* test(docs): validate all integration screenshot references

---------

Co-authored-by: jinli.yl <jinli.yl@alibaba-inc.com>
This commit is contained in:
Ziyang Guo 2026-10-06 14:32:09 +08:00 • committed by GitHub
parent dc12798526
commit 084c02e43a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 0 deletions

View file

@ -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'

View file

@ -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"

View file

@ -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,
});

View file

@ -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",
];