-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (41 loc) · 1.04 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
name: Publish wiki
on:
workflow_dispatch:
push:
branches:
- "master"
jobs:
generatewiki:
name: Generate WIKI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up GO
uses: actions/setup-go@v5
with:
go-version: '1.23'
check-latest: true
- name: Generate wiki
run: |
make genwiki PARAM=--verbose
- name: Publish if any changes
env:
GIT_USER_EMAIL: ${{ secrets.PERBOT_EMAIL }}
GIT_USER_NAME: ${{ secrets.PERBOT_USERNAME }}
run: |
git status
cd gopherciser.wiki
if [[ "$(git diff --name-only)" != "" ]]; then
git status
echo "publishing wiki"
set -e
git config user.email "$GIT_USER_EMAIL"
git config user.name "$GIT_USER_NAME"
git commit -a -m "Github action automatically generated wiki"
git push
else
echo "no changes skipping publish"
fi