diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2024-09-27 20:25:46 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2024-09-27 20:25:46 +0200 |
| commit | 933ca39d1e692f7e80fb7865e40ad950d5ac91cb (patch) | |
| tree | 034131ec7e32822f3e1134632b461a10f7804910 | |
| parent | 628b3c2249db280ecb60ec0f8fd8053f88a265e4 (diff) | |
| download | gohugo-theme-ed-933ca39d1e692f7e80fb7865e40ad950d5ac91cb.tar.gz | |
Correct Netlify setup
| -rw-r--r-- | netlify.toml | 8 |
1 files changed, 3 insertions, 5 deletions
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 |
