-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.13 KB
/
update-wiki.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
name: update-wiki
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'docs/**'
jobs:
update-wiki:
runs-on: ubuntu-20.04
env:
VARIANT_NAME: ${{ github.event.inputs.variantName }}
BASE_VERSION: ${{ github.event.inputs.baseVersion }}
PLUGINS_BACKEND: ${{ github.event.inputs.pluginsBackend }}
steps:
- name: Checkout base code
uses: actions/checkout@v2
with:
path: base
- name: Checkout wiki code
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: wiki
- uses: rlespinasse/[email protected]
with:
path: base/docs/source
format: svg
output: .
remove-page-suffix: true
- name: Push to wiki
run: |
find wiki/* ! -name '.git' -exec rm -rf {} +
cp -a base/docs/source/. wiki/
cd wiki
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
git add .
git diff-index --quiet HEAD || git commit -m "Updates" && git push