Merge pull request #85 from nikazzio/feat/studio-local-readiness-gating #4
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: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "docs/wiki/**" | |
| - "docs/WIKI_MAINTENANCE.md" | |
| - "scripts/sync_wiki.py" | |
| permissions: | |
| contents: write | |
| jobs: | |
| test-wiki-sync: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Test sync (dry-run) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python scripts/sync_wiki.py \ | |
| --repo "${{ github.repository }}" \ | |
| --source-root "docs/wiki" \ | |
| --wiki-dir "/tmp/iiif-wiki-sync-test" \ | |
| --dry-run | |
| publish-wiki: | |
| needs: test-wiki-sync | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Sync wiki | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| python scripts/sync_wiki.py \ | |
| --repo "${{ github.repository }}" \ | |
| --source-root "docs/wiki" \ | |
| --wiki-dir "/tmp/iiif-wiki-sync" \ | |
| --push \ | |
| --commit-message "docs(wiki): sync from docs/wiki (${GITHUB_SHA})" |