-
-
Notifications
You must be signed in to change notification settings - Fork 27
38 lines (31 loc) · 977 Bytes
/
wiki.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Push to GH Wiki
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
- .github/workflows/wiki.yaml
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: ${{ github.repository }}.wiki
path: wiki.git
- name: sync wiki
run: rsync -av --delete --exclude=README.md --exclude=.git docs/ wiki.git/
- name: remove header line
run: sed -i '1d' wiki.git/*.md
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "Automatically publish wiki" && git push
working-directory: wiki.git