name: Sync Wiki on: push: branches: [main] paths: - 'docs/**' - 'scripts/sync-wiki.ps1' - '.github/workflows/wiki-sync.yml' workflow_dispatch: jobs: sync: # Gitea reads .github/workflows/ for compatibility, but this workflow # pushes to a GitHub-hosted wiki. Skip on non-GitHub runners; the Gitea # wiki is synced separately via scripts/sync-wiki.ps1. if: github.server_url == 'https://github.com' runs-on: windows-latest permissions: contents: write steps: - uses: actions/checkout@v4 - name: Sync docs/ to GitHub wiki shell: pwsh env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | $repo = '${{ github.repository }}' $wikiUrl = "https://x-access-token:$env:GH_TOKEN@github.com/$repo.wiki.git" ./scripts/sync-wiki.ps1 -WikiUrl $wikiUrl