From 4205f948455395a8f38c26296a9fa13cdff81597 Mon Sep 17 00:00:00 2001 From: svenMinio Date: Mon, 18 May 2026 16:23:13 +0200 Subject: [PATCH] =?UTF-8?q?.forgejo/workflows/sync-wiki.yaml=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .forgejo/workflows/sync-wiki.yaml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .forgejo/workflows/sync-wiki.yaml diff --git a/.forgejo/workflows/sync-wiki.yaml b/.forgejo/workflows/sync-wiki.yaml new file mode 100644 index 0000000..a034c9c --- /dev/null +++ b/.forgejo/workflows/sync-wiki.yaml @@ -0,0 +1,35 @@ +name: Sync Wiki Folder to Wiki Repo + +on: + push: + branches: + - main + paths: + - 'wiki/**' + +jobs: + update-wiki: + runs-on: ubuntu-latest + if: github.server_url == 'https://source-collab.com' + steps: + - name: Checkout Main Repo + uses: actions/checkout@v4 + with: + path: main-repo + + - name: Checkout Wiki Repo + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }}.wiki + path: wiki-repo + token: ${{ secrets.WIKI_SYNC_TOKEN }} + + - name: Sync and Push + run: | + cp -r main-repo/wiki/* wiki-repo/ + cd wiki-repo + git config user.name "Source-Collab Bot" + git config user.email "bot@source-collab.com" + git add . + git commit -m "Auto-sync Wiki (Commit: ${{ github.sha }})" || echo "No changes to the commit." + git push \ No newline at end of file