Skip to content

Synchronizing branch "wiki" with GitHub Wiki #172

Synchronizing branch "wiki" with GitHub Wiki

Synchronizing branch "wiki" with GitHub Wiki #172

name: Synchronizing branch "wiki" with GitHub Wiki
on:
[gollum, workflow_dispatch]
jobs:
sync-with-wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ format('{0}.wiki', github.repository) }}
persist-credentials: false
fetch-depth: 0
- name: sync
run: |
git remote add main-repo "${GITHUB_SERVER_URL%%://*}://${PAT_USERNAME}:${PAT_TOKEN}@${GITHUB_SERVER_URL#*://}/$GITHUB_REPOSITORY.git"
git push main-repo @:wiki
env:
PAT_USERNAME: ${{ secrets.PAT_USERNAME }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}