Skip to content

Commit 7490bb0

Browse files
fix: resolve wiki sync .gitignore conflict by using tmp directory
1 parent 4d0dda9 commit 7490bb0

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/docs.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,30 @@ jobs:
4444
env:
4545
GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN || secrets.GITHUB_TOKEN }}
4646
run: |
47-
# 1. Clone Wiki Repository into a temporary folder
47+
# 1. Clone Wiki Repository into a temporary folder outside workspace
4848
WIKI_URL="https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git"
49-
git clone $WIKI_URL wiki-sync
49+
git clone $WIKI_URL /tmp/wiki-sync
5050
5151
# 2. Clean existing files (except .git)
52-
find wiki-sync -mindepth 1 -not -name '.git' -delete
52+
find /tmp/wiki-sync -mindepth 1 -not -name '.git' -delete
5353
5454
# 3. Copy generated API docs
55-
cp -r docs/api/* wiki-sync/
55+
cp -r docs/api/* /tmp/wiki-sync/
5656
5757
# 4. Inject manual guides
58-
[ -f "docs/contributing.md" ] && cp docs/contributing.md wiki-sync/Contributing.md
59-
[ -f "docs/operations.md" ] && cp docs/operations.md wiki-sync/Operations.md
60-
[ -f "docs/usage.md" ] && cp docs/usage.md wiki-sync/Usage.md
58+
[ -f "docs/contributing.md" ] && cp docs/contributing.md /tmp/wiki-sync/Contributing.md
59+
[ -f "docs/operations.md" ] && cp docs/operations.md /tmp/wiki-sync/Operations.md
60+
[ -f "docs/usage.md" ] && cp docs/usage.md /tmp/wiki-sync/Usage.md
6161
6262
# 5. Build/Update Sidebar
63-
# If typedoc-github-wiki-theme generated a _Sidebar.md, we append to it.
64-
# Otherwise we create one.
65-
if [ -f "wiki-sync/_Sidebar.md" ]; then
66-
echo -e "\n\n## Guides\n* [[Contributing]]\n* [[Operations]]\n* [[Usage]]" >> wiki-sync/_Sidebar.md
63+
if [ -f "/tmp/wiki-sync/_Sidebar.md" ]; then
64+
echo -e "\n\n## Guides\n* [[Contributing]]\n* [[Operations]]\n* [[Usage]]" >> /tmp/wiki-sync/_Sidebar.md
6765
else
68-
echo -e "## Guides\n* [[Contributing]]\n* [[Operations]]\n* [[Usage]]" > wiki-sync/_Sidebar.md
66+
echo -e "## Guides\n* [[Contributing]]\n* [[Operations]]\n* [[Usage]]" > /tmp/wiki-sync/_Sidebar.md
6967
fi
7068
7169
# 6. Commit and Push
72-
cd wiki-sync
70+
cd /tmp/wiki-sync
7371
git add .
7472
if git diff-index --quiet HEAD --; then
7573
echo "Keine Änderungen an der Dokumentation festgestellt."

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ node_modules/
1313
# Temporary files
1414
/build/
1515
/internal/
16-
/wiki-repo/
17-
/wiki-sync/
1816
*.log
1917
.DS_Store
2018

0 commit comments

Comments
 (0)