refact: merge HUGO_VERSION, add deploy-preview. (#18020)
parent
f9a939c5cf
commit
6275183b59
5
Makefile
5
Makefile
|
@ -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
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ HUGO_ENV = "production"
|
|||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
command = "make deploy-preview"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL"
|
||||
command = "make deploy-preview"
|
||||
|
||||
[context.master]
|
||||
# This context is triggered by the `master` branch and allows search indexing
|
||||
|
|
Loading…
Reference in New Issue