@@ -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."
0 commit comments