Merge pull request #18 from kodjunkie/release/v2.2.0 #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Wiki Sync | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - 'docs/wiki/**' | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Sync wiki | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git" wiki | |
| rsync -av --delete --exclude='.git' docs/wiki/ wiki/ | |
| cd wiki | |
| if [ -z "$(git status --porcelain)" ]; then | |
| echo "No wiki changes to push" | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "docs: sync wiki from ${GITHUB_SHA::7}" | |
| git push |