-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (50 loc) · 1.29 KB
/
publishwiki.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Publish wiki
on:
workflow_dispatch:
push:
branches:
- "documentation/1584-actions-to-wiki"
jobs:
generatewiki:
name: Generate WIKI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up GO
uses: actions/setup-go@v3
with:
go-version: 1.23
- name: Cache go modules
id: cache-go
uses: actions/cache@v3
env:
cache-name: dependency-cache-1.23
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Generate wiki
run: |
make genwiki PARAM=--verbose
- name: Publish if any changes
run: |
git status
cd gopherciser.wiki
if [[ "$(git diff --name-only)" != "" ]]; then
git status
echo "publishing wiki"
git checkout master
set -e
git config user.email "[email protected]"
git config user.name "Qlik Performance Robot"
git commit -a -m "Github action automatically generated wiki"
git push
else
echo "no changes skipping publish"
fi