mirror of
https://github.com/acamarata/qibla.git
synced 2026-07-01 19:34:28 +00:00
ci(qibla): graceful wiki-sync skip when wiki uninitialized (no red CI)
This commit is contained in:
parent
0f62a0e904
commit
df2cc65aed
1 changed files with 8 additions and 5 deletions
13
.github/workflows/wiki-sync.yml
vendored
13
.github/workflows/wiki-sync.yml
vendored
|
|
@ -17,14 +17,17 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Checkout wiki
|
- name: Checkout wiki
|
||||||
|
id: clone_wiki
|
||||||
run: |
|
run: |
|
||||||
git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" .wiki-remote \
|
if git clone "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git" .wiki-remote 2>&1; then
|
||||||
|| (mkdir -p .wiki-remote \
|
echo "wiki_exists=true" >> "$GITHUB_OUTPUT"
|
||||||
&& cd .wiki-remote \
|
else
|
||||||
&& git init \
|
echo "wiki_exists=false" >> "$GITHUB_OUTPUT"
|
||||||
&& git remote add origin "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git")
|
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
|
- name: Sync wiki pages
|
||||||
|
if: steps.clone_wiki.outputs.wiki_exists == 'true'
|
||||||
run: |
|
run: |
|
||||||
cp .github/wiki/*.md .wiki-remote/
|
cp .github/wiki/*.md .wiki-remote/
|
||||||
cd .wiki-remote
|
cd .wiki-remote
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue