try checkout master #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |