Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXCDT-271: Add ci step to check that docs are up to date #560

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Check out the code
uses: actions/checkout@v3

- name: Check that docs were generated
run: make check-docs

- name: Check for go vulnerabilities
run: make check-vuln

Expand Down
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ $(GO_BIN)/auth0:
#-----------------------------------------------------------------------------------------------------------------------
# Documentation
#-----------------------------------------------------------------------------------------------------------------------
.PHONY: docs-build docs-start docs-clean
.PHONY: docs docs-start docs-clean

docs-build: docs-clean ## Build the documentation
docs: docs-clean ## Build the documentation
@go run ./cmd/build_doc
@mv ./docs/auth0.md ./docs/index.md
@cd docs && bundle install
Expand All @@ -82,7 +82,7 @@ docs-start: ## Start the doc site locally for testing purposes
@cd docs && bundle exec jekyll serve

docs-clean: ## Remove the documentation
@rm ./docs/auth0_*.md
@rm -f ./docs/auth0_*.md

#-----------------------------------------------------------------------------------------------------------------------
# Building & Installing
Expand Down Expand Up @@ -115,6 +115,18 @@ check-vuln: $(GO_BIN)/govulncheck ## Check go vulnerabilities
${call print, "Running govulncheck over project"}
@govulncheck -v ./...

check-docs: ## Check that documentation was generated correctly
${call print, "Checking that documentation was generated correctly"}
@$(MAKE) docs
@if [ -n "$$(git status --porcelain)" ]; \
then \
echo "Rebuilding the documentation resulted in changed files:"; \
echo "$$(git diff)"; \
echo "Please run \`make docs\` to regenerate docs."; \
exit 1; \
fi
@echo "Documentation is generated correctly."

#-----------------------------------------------------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,4 @@ DEPENDENCIES
webrick (~> 1.7)

BUNDLED WITH
2.1.4
2.3.26
2 changes: 1 addition & 1 deletion docs/auth0_quickstarts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Quickstart support for getting bootstrapped

### Synopsis

Quickstart support for getting bootstrapped.
Step-by-step guides to quickly integrate Auth0 into your application.

### Options

Expand Down