Skip to content

Commit

Permalink
docs: fix docs ci (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesomers authored Jun 25, 2024
1 parent a7dbf20 commit 9c21370
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ ifdef COLOR_SUPPORT
endif
endif


.PHONY: docs-build
docs-build: ## Build the docs using docker. Example: `make docs-build VERSION=v1.0.0`
@if [ -z "${VERSION}" ]; then echo -e "${RED}VERSION is not set. Example: 'make docs-build VERSION=v1.0.0'. Run 'make help' for usage. ${RESET}"; exit 1; fi
@echo -e "Docs version is: ${GREEN}$(VERSION)${RESET}"
docker build -f ./docs/Dockerfile -t docs:$(VERSION) . \
--build-arg GIT_USER_NAME="$(GIT_USER_NAME)" \
--build-arg GIT_USER_EMAIL="$(GIT_USER_EMAIL)" \
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)"
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)" \
--no-cache

.PHONY: docs-deploy
docs-deploy: ## Build and deploy the docs using 'mike'. Example: `make docs-deploy VERSION=v1.0.0 ALIAS=latest`
@if [ -z "${VERSION}" ]; then echo -e "${RED}VERSION is not set. Example: 'make docs-deploy VERSION=v1.0.0'. Run 'make help' for usage. ${RESET}"; exit 1; fi
Expand All @@ -38,7 +37,7 @@ docs-deploy: ## Build and deploy the docs using 'mike'. Example: `make docs-depl
docker build -f ./docs/Dockerfile -t docs:$(VERSION) . \
--build-arg GIT_USER_NAME="$(GIT_USER_NAME)" \
--build-arg GIT_USER_EMAIL="$(GIT_USER_EMAIL)" \
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)"
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)" \
--no-cache
docker run -t docs:$(VERSION) mike deploy $(VERSION) ${ALIAS} --update-aliases
docker run -t docs:$(VERSION) mike set-default $(ALIAS) --push --allow-empty
Expand All @@ -50,7 +49,7 @@ docs-local-docker: ## Build and run the docs locally using docker and 'serve'. E
docker build -f ./docs/Dockerfile -t docs:$(VERSION) . \
--build-arg GIT_USER_NAME="$(GIT_USER_NAME)" \
--build-arg GIT_USER_EMAIL="$(GIT_USER_EMAIL)" \
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)"
--build-arg GITHUB_ACTIONS="$(GITHUB_ACTIONS)" \
--no-cache
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs docs:$(VERSION) mkdocs serve --dev-addr=0.0.0.0:8000

Expand Down

0 comments on commit 9c21370

Please sign in to comment.