Add Appendix AC (GitHub CLI), AD (Git Security), AE (GitHub Social) #9
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 docs to Wiki | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'docs/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Clone GitHub Wiki | |
| run: | | |
| git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki | |
| - name: Sync docs to wiki | |
| run: | | |
| rsync -av --delete --exclude='.git' docs/ wiki/ | |
| cd wiki | |
| git add -A | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git commit -m "Sync docs from repository [skip ci]" | |
| git push origin HEAD | |
| else | |
| echo "No changes to commit" | |
| fi |