Repository navigation
Gitea Actions: workflow guards + .gitea release pipeline (#7) #3
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: 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 |