From 933ca39d1e692f7e80fb7865e40ad950d5ac91cb Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 27 Sep 2024 20:25:46 +0200 Subject: Correct Netlify setup --- netlify.toml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'netlify.toml') diff --git a/netlify.toml b/netlify.toml index bd57110..14fc339 100644 --- a/netlify.toml +++ b/netlify.toml @@ -19,7 +19,7 @@ # here, but we recommend using the Netlify UI for sensitive # values to keep them out of your source repository. [context.production] - command = 'hugo --source=exampleSite --baseURL ${URL} --destination ../public --minify' + command = 'npm run netlify-production; hugo --source=exampleSite --baseURL ${URL} --destination ../public --minify' [context.production.environment] HUGO_ENV = 'production' @@ -28,12 +28,10 @@ # Deploy Preview context: all deploys generated from # a pull/merge request will inherit these settings. [context.deploy-preview] - # command = 'npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public --minify' - command = 'npm run netlify-production; npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public; cat ./public/index.html' + command = 'npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public --minify' [context.deploy-preview.environment] - # HUGO_ENV = 'development' - HUGO_ENV = 'production' + HUGO_ENV = 'development' # Branch Deploy context: all deploys that are not from # a pull/merge request or from the Production branch -- cgit v1.2.3