docs(wiki): update ZIP file reuse feature design doc according to lat… #7
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: | |
| paths: | |
| - docs/wiki/** | |
| - .github/workflows/wiki-sync.yml | |
| branches: | |
| - master | |
| env: | |
| CLICOLOR: 1 # Enables pretty color output for typos | |
| jobs: | |
| run: | |
| name: Run | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: 📥 Checkout source | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| sparse-checkout: docs | |
| path: src | |
| - name: 📥 Checkout ancillary wiki repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| repository: ${{ github.repository }}.wiki | |
| path: wiki | |
| - name: 🔄 Sync wiki files | |
| run: rsync -av --delete --exclude=.git src/docs/wiki/ wiki | |
| - name: "🔍 Lint: check typos" | |
| uses: crate-ci/typos@v1 | |
| with: | |
| files: wiki | |
| - name: 📝 Extract source commit metadata | |
| working-directory: src | |
| shell: bash | |
| run: | | |
| echo "WIKI_SYNC_REF_AUTHOR=$(git show -s --format='%an <%ae>' HEAD)" >> "$GITHUB_ENV" | |
| echo "WIKI_SYNC_REF_AUTHOR_DATE=$(git show -s --format='%ad' HEAD)" >> "$GITHUB_ENV" | |
| git show -s --format='${{ github.repository }}@%h: %s%n%n%b' HEAD > /tmp/wiki_sync_commit_message | |
| - name: 💾 Commit wiki file changes to wiki repository | |
| working-directory: wiki | |
| run: | | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git config --global user.name 'github-actions[bot]' | |
| git add . | |
| git commit \ | |
| --author="$WIKI_SYNC_REF_AUTHOR" --date="$WIKI_SYNC_REF_AUTHOR_DATE" \ | |
| --message="$(cat /tmp/wiki_sync_commit_message)" \ | |
| --allow-empty \ | |
| --trailer="Produced-For:${{ github.sha }}" \ | |
| --trailer="Workflow-Run-Id:${{ github.run_id }}" \ | |
| --trailer="Workflow-Run-Url:https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| git push |