Skip to content

update workflow

update workflow #12

Workflow file for this run

name: Update Wiki
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update-wiki:
name: Update Wiki with gomarkdocs output
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.0'
- name: Install gomarkdoc
run: go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
- name: Clone Wiki repository
run: |
git clone https://github.com/${{ github.repository }}.wiki.git wiki
- name: Generate documentation
run: gomarkdoc --output wiki/Home.md
- name: Commit and push changes if needed
run: |
cd wiki
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
if [[ -n "$(git status --porcelain)" ]]; then
git add Home.md
git commit -m "Update Wiki documentation [ci skip]"
git push
else
echo "No changes to commit"
fi