refact: merge HUGO_VERSION, add deploy-preview. (#18020)

This commit is contained in:
Jacky Wu
2020-01-15 20:47:33 +08:00
committed by Kubernetes Prow Robot
parent f9a939c5cf
commit 6275183b59
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
DOCKER = docker
HUGO_VERSION = 0.59.1
HUGO_VERSION = $(shell grep ^HUGO_VERSION netlify.toml | tail -n 1 | cut -d '=' -f 2 | tr -d " \"\n")
DOCKER_IMAGE = kubernetes-hugo
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(CURDIR):/src
NODE_BIN = node_modules/.bin
@@ -18,6 +18,9 @@ build: ## Build site with production settings and put deliverables in ./public
build-preview: ## Build site with drafts and future posts enabled
hugo --buildDrafts --buildFuture
deploy-preview: check-hugo-versions ## Deploy preview site via netlify
hugo --enableGitInfo --buildFuture -b $(DEPLOY_PRIME_URL)
functions-build:
$(NETLIFY_FUNC) build functions-src