-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (24 loc) · 897 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: docs
default: help
# Variables
PIP := $(if [-z $(shell which pip) ],pip3,pip)
POETRY := $(shell which poetry 2> /dev/null)
help: ## Show help
@echo "\nUsage:\e[1;36m make [target]\e[0m\n"
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " -\033[36m %-20s\033[0m %s\n", $$1, $$2}'
install: ## Install required dependencies
@if [ -z $(POETRY) ]; then \
echo "Poetry could not be found, installing..."; \
$(PIP) install poetry; \
poetry install; \
else \
poetry install; \
fi
$(PIP) install pre-commit;
pre-commit install --hook-type pre-commit --hook-type pre-push
serve: ## Serve mkdocs in local
poetry run mkdocs serve --strict
build: ## Build mkdocs in local
poetry run mkdocs build --strict
deploy: ## Deploy mkdocs to github pages
cd mclargo.github.io; poetry run mkdocs gh-deploy --config-file ../mkdocs.yml --remote-branch master