From df2cc65aed01931a08cb0855a001a1d7b35aa1b1 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Fri, 29 May 2026 15:21:02 -0400 Subject: [PATCH] ci(qibla): graceful wiki-sync skip when wiki uninitialized (no red CI) --- .github/workflows/wiki-sync.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml index b4508ab..616cdb1 100644 --- a/.github/workflows/wiki-sync.yml +++ b/.github/workflows/wiki-sync.yml @@ -17,14 +17,17 @@ jobs: uses: actions/checkout@v4 - name: Checkout wiki + id: clone_wiki run: | - 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") + 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. Create the first page once via the GitHub web UI; subsequent runs will sync .github/wiki automatically." + fi - name: Sync wiki pages + if: steps.clone_wiki.outputs.wiki_exists == 'true' run: | cp .github/wiki/*.md .wiki-remote/ cd .wiki-remote