From 0f62a0e904e4e000c78c283c1c1c9a543341ab45 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Fri, 29 May 2026 15:09:20 -0400 Subject: [PATCH] ci(qibla): self-healing wiki-sync (bootstrap empty wiki, match other repos) --- .github/workflows/wiki-sync.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml index 69b3350..b4508ab 100644 --- a/.github/workflows/wiki-sync.yml +++ b/.github/workflows/wiki-sync.yml @@ -3,7 +3,7 @@ name: Sync Wiki on: push: branches: [main] - paths: [".github/wiki/**"] + paths: ['.github/wiki/**'] workflow_dispatch: permissions: @@ -17,17 +17,14 @@ jobs: uses: actions/checkout@v4 - name: Checkout wiki - id: clone_wiki run: | - if git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" .wiki-remote 2>&1; then - echo "wiki_exists=true" >> "$GITHUB_OUTPUT" - else - echo "wiki_exists=false" >> "$GITHUB_OUTPUT" - echo "Wiki not yet initialized — skipping sync. Initialize via GitHub web UI first." - fi + git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" .wiki-remote \ + || (mkdir -p .wiki-remote \ + && cd .wiki-remote \ + && git init \ + && git remote add origin "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git") - name: Sync wiki pages - if: steps.clone_wiki.outputs.wiki_exists == 'true' run: | cp .github/wiki/*.md .wiki-remote/ cd .wiki-remote