From 63b27da4a3df2b3d312fd147eabe3f78ec675084 Mon Sep 17 00:00:00 2001 From: lekhrocks Date: Sun, 6 Sep 2026 12:18:36 +0530 Subject: [PATCH] ci: auto-sync wiki pages to GitHub wiki on merge --- .github/workflows/wiki-sync.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/wiki-sync.yml diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml new file mode 100644 index 0000000..23d379c --- /dev/null +++ b/.github/workflows/wiki-sync.yml @@ -0,0 +1,30 @@ +name: Wiki Sync + +on: + push: + branches: [main] + paths: ['wiki/**'] + +jobs: + sync-wiki: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - name: Sync wiki pages + run: | + git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki-repo + rm -rf wiki-repo/*.md + cp wiki/*.md wiki-repo/ + cd wiki-repo + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add -A + if git diff --cached --quiet; then + echo "No changes to sync" + else + git commit -m "Sync wiki from main" + git push + fi