Debian Codegraph @

.github/workflows/wiki.yaml

raw
1 name: Push to GH Wiki
2
3 on:
4 workflow_dispatch:
5 push:
6 branches:
7 - main
8 paths:
9 - docs/**
10 - .github/workflows/wiki.yaml
11
12 permissions:
13 contents: write
14
15 jobs:
16 build:
17 runs-on: ubuntu-latest
18
19 steps:
20 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21 with:
22 persist-credentials: 'false'
23
24 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25 with:
26 persist-credentials: 'true'
27 repository: ${{ github.repository }}.wiki
28 path: wiki.git
29
30 - name: sync wiki
31 run: rsync -av --delete --exclude=README.md --exclude=.git docs/ wiki.git/
32
33 - name: remove header line
34 run: sed -i '1d' wiki.git/*.md
35
36 - name: Commit files
37 run: |
38 git config --local user.email "[email protected]"
39 git config --local user.name "GitHub Action"
40 git add .
41 git diff-index --quiet HEAD || git commit -m "Automatically publish wiki" && git push
42 working-directory: wiki.git