Fix Netlify settings for separate deployments

This commit is contained in:
Gabriel Arazas 2023-04-21 16:43:28 +08:00
parent 9368630d56
commit f0884e0a40
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 11 additions and 8 deletions

View File

@ -2,6 +2,10 @@
build: build:
hugo --destination public hugo --destination public
.PHONY: build-draft
build-draft:
hugo --environment development --buildDrafts --buildFuture --buildExpired --destination public
.PHONY: build-openring .PHONY: build-openring
build-openring: build-openring:
./bin/openring-create --input assets/templates/openring-input.html --output layouts/partials/openring.html ./bin/openring-create --input assets/templates/openring-input.html --output layouts/partials/openring.html

View File

@ -1,15 +1,14 @@
[build] [build]
publish = "public/" publish = "public/"
command = "make build" command = "make build -e"
[context.production.environment] [context.production.environment]
HUGO_BASE_URL = "$DEPLOY_URL" HUGO_BASEURL = "$DEPLOY_URL"
[context.branch-deploy.environment] [context.branch-deploy]
HUGO_BASE_URL = "$DEPLOY_PRIME_URL" command = "make build-draft -e"
environment.HUGO_BASEURL = "$DEPLOY_PRIME_URL"
[context.deploy-preview] [context.deploy-preview]
command = "hugo --buildDrafts --buildFuture --buildExpired" command = "make build-draft -e"
environment.HUGO_BASEURL = "$DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_BASE_URL = "$DEPLOY_PRIME_URL"