-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (36 loc) · 1.19 KB
/
wiki-pipeline.yml
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
39
40
41
42
43
44
45
46
47
name: Wiki Pipeline
on:
push:
branches:
- "main"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
updateWiki:
runs-on: ubuntu-latest
env:
working-directory: ./wiki
steps:
- uses: actions/checkout@v2
# Checking out the wiki repo under the path ./wiki/
- uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: wiki
- name: install yq
uses: mikefarah/yq@v4.18.1
# Generating the wiki pages from the comments inside the rules
- name: generate docs
run: bash ./util/scripts/generateDocs.sh ./rules ./wiki
- name: set commit user
working-directory: ${{env.working-directory}}
run: git config --global user.email "wiki@pipeline" && git config --global user.name "Wiki Pipeline"
- name: stage updates
working-directory: ${{env.working-directory}}
run: git add *.md
- name: commit updates
working-directory: ${{env.working-directory}}
run: git commit -m "Generated Wiki"
- name: push changes
working-directory: ${{env.working-directory}}
run: git push