Skip to content

Update autodoc.yml

Update autodoc.yml #5

Workflow file for this run

name: Generate Docs
on:
push:
branches: [ autodoc ]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
- name: Check out gomarkdoc
run: |
GO111MODULE=on go get -u github.com/princjef/gomarkdoc/cmd/gomarkdoc
env:
GOPATH: /home/runner/work/go
- name: GenDocs
id: GenDocs
continue-on-error: true
run: |
/home/runner/work/go/bin/gomarkdoc . > ./docs.md
exit $(git diff --exit-code docs.md)
- name: Commit Changes
if: steps.GenDocs.outcome == 'failure'
run: |
git config --global user.name 'AutoDocAction'
git config --global user.email 'AudoDocAction@no-reply.com'
git add docs.md
git commit -m "auto generated docs"
git push