Skip to content

Commit b1b8893

Browse files
committed
[docs] workflow to handle KMCP_VERSION
doc builds are breaking with errors like: ``` 09:43:27.077 Error occurred prerendering page "/docs/kagent/resources/helm". Read more: https://nextjs.org/docs/messages/prerender-error 09:43:27.077 ReferenceError: KMCP_VERSION is not defined ``` it looks like the ${KMCP_VERSION} does not have codeticks so it breaks the build follow up to #280 Signed-off-by: Art Berger <[email protected]>
1 parent 5787a6e commit b1b8893

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/update-ref-docs.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,16 @@ jobs:
224224
# (might be replaced by helm docs template in the future)
225225
sed -i '/!\[Version:/,/^$/d' "src/app/docs/kagent/resources/helm/temp.mdx"
226226

227+
# Wrap the KMCP version placeholder in inline code so it shows literally in MDX
228+
python - <<'PY'
229+
from pathlib import Path
230+
231+
path = Path("src/app/docs/kagent/resources/helm/temp.mdx")
232+
text = path.read_text()
233+
text = text.replace("${KMCP_VERSION}", "`" + "${KMCP_VERSION}" + "`")
234+
path.write_text(text)
235+
PY
236+
227237
# Add frontmatter
228238
echo '---' > "src/app/docs/kagent/resources/helm/page.mdx"
229239
echo 'title: "Helm Chart Configuration"' >> "src/app/docs/kagent/resources/helm/page.mdx"

0 commit comments

Comments
 (0)