.forgejo/workflows/sync-wiki.yaml hinzugefügt

This commit is contained in:
Sven Minio 2026-05-18 16:23:13 +02:00
commit 4205f94845

View file

@ -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