Skip to content

Commit

Permalink
Add verify-docs target.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyp committed Oct 22, 2024
1 parent 338d843 commit b4a8a9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on: [ push ]
jobs:
ci:
runs-on: [ ubuntu-latest ]
env:
GOMARKDOC_OPTS: -c
strategy:
matrix:
target: [ test, lint, docs ]
target: [ test, lint, verify-docs ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ $(GOPATH)/bin/gomarkdoc:
.PHONY: docs
docs: $(GOPATH)/bin/gomarkdoc ## Generate docs using gomarkdoc
$< $(GOMARKDOC_OPTS) -o ./dynoid/README.md -e ./dynoid/...

.PHONY: verify-docs
verify-docs: $(GOPATH)/bin/gomarkdoc
@cp ./dynoid/README.md ./dynoid/README.md.orig
@$< $(GOMARKDOC_OPTS) -o ./dynoid/README.md -e ./dynoid/...
@if ! cmp ./dynoid/README.md ./dynoid/README.md.orig; then printf "docs not generated\n" >&2; false; fi

0 comments on commit b4a8a9e

Please sign in to comment.