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