From c098dbc7872a85a32099e04b467c19c944d877e8 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Fri, 18 Sep 2026 01:27:43 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20add=20=F0=9F=A6=A9=20Flamingo=20Code?= =?UTF-8?q?=20Documentation=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This workflow enables automated documentation generation using the 🦩 Flamingo Code Documentation pipeline. It runs on repository_dispatch events triggered by the multi-platform-hub. No secrets required - all credentials are passed securely at runtime. --- .github/workflows/doc-orchestrator.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doc-orchestrator.yml b/.github/workflows/doc-orchestrator.yml index 764eeea3..217eed8c 100644 --- a/.github/workflows/doc-orchestrator.yml +++ b/.github/workflows/doc-orchestrator.yml @@ -1955,9 +1955,13 @@ jobs: rm -f /tmp/ecosystem.md exit 0 fi - mkdir -p "$REFERENCE_OUTPUT_PATH" - cp /tmp/ecosystem.md "$REFERENCE_OUTPUT_PATH/ecosystem.md" - echo "✅ ecosystem.md ($(wc -c < /tmp/ecosystem.md | tr -d ' ') bytes) → $REFERENCE_OUTPUT_PATH/ecosystem.md" + # Kept in /tmp ONLY until Stage 2 has run. The reference directory is + # CodeWiki's output directory, and CodeWiki asks "already contains + # documentation. Overwrite?" when it finds a .md file there — a prompt + # a runner cannot answer, so Stage 2 aborted on every CodeWiki repo + # (CodeWiki run 35293807658). The Stage 2 commit step copies the file + # into place, after either engine has written its own output. + echo "✅ ecosystem.md ($(wc -c < /tmp/ecosystem.md | tr -d ' ') bytes) fetched; copied to $REFERENCE_OUTPUT_PATH after Stage 2" HTTP_CODE=$(node /tmp/ci-hub.mjs get "${ECOSYSTEM_PATH}&format=agents" /tmp/ecosystem-agents.md) || HTTP_CODE="000" if [ "$HTTP_CODE" = "200" ]; then @@ -2388,6 +2392,15 @@ jobs: fi echo "" + # The hub-rendered ecosystem.md joins the reference directory only NOW, + # after the engine has run: placed earlier it makes CodeWiki prompt for + # an overwrite (see "Fetch ecosystem facts"). + if [ -f /tmp/ecosystem.md ]; then + mkdir -p "$REFERENCE_OUTPUT_PATH" + cp /tmp/ecosystem.md "$REFERENCE_OUTPUT_PATH/ecosystem.md" + echo " Added ecosystem.md to $REFERENCE_OUTPUT_PATH/" + fi + # Stage all .md, .mmd, and .gitignore files from Stage 2 output directories # CRITICAL: Use git add on full paths to preserve nested directory structure # This ensures Backend/Authentication/JWT/JWT.md keeps its full path in git