Skip to content

Sync Wiki

Sync Wiki #5

Workflow file for this run

name: Sync Wiki
on:
push:
branches:
- main
paths:
- 'wiki/**'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Push to wiki
run: |
git clone https://${{ secrets.WIKI_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki-repo
rsync -av --delete wiki/ ./wiki-repo/ --exclude .git
cd wiki-repo
git config user.name WikiBot
git config user.email [email protected]
git add .
git commit -m "docs: Update wiki" || echo "No changes to commit"
git push https://${{ secrets.WIKI_TOKEN }}@github.com/${{ github.repository }}.wiki.git