Skip to content

Commit

Permalink
chore: add make docs/serve for local docs viewing
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Dec 6, 2024
1 parent e9ef4fe commit 128eb2e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,16 @@ install-linux:
install-darwin:
cp builds/lagoon-cli-${VERSION}-darwin-amd64 ${ARTIFACT_DESTINATION}/lagoon

# Settings for the MKDocs serving
MKDOCS_IMAGE ?= ghcr.io/amazeeio/mkdocs-material
MKDOCS_SERVE_PORT ?= 8000

.PHONY: docs/serve
docs/serve:
@echo "Starting container to serve documentation"
@docker pull $(MKDOCS_IMAGE)
@docker run --rm -it \
-p 127.0.0.1:$(MKDOCS_SERVE_PORT):$(MKDOCS_SERVE_PORT) \
-v ${PWD}:/docs \
--entrypoint sh $(MKDOCS_IMAGE) \
-c 'mkdocs serve -s --dev-addr=0.0.0.0:$(MKDOCS_SERVE_PORT) -f mkdocs.yml'

0 comments on commit 128eb2e

Please sign in to comment.