Skip to content

Commit 4611cec

Browse files
author
Splitter
committed
chore: verbose Netlify logs
1 parent 37859c4 commit 4611cec

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

netlify.toml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,55 @@
11
[build]
2-
command = "pnpm install && hugo --gc --minify -b $URL && pnpm dlx pagefind --source 'public'"
2+
command = """
3+
set -e
4+
echo "=== Starting Documentation build process ==="
5+
echo "Node version: $(node --version)"
6+
echo "pnpm version: $(pnpm --version)"
7+
echo "Hugo version: $(hugo version)"
8+
9+
echo "=== Installing dependencies ==="
10+
pnpm install --verbose
11+
12+
echo "=== Running Hugo build ==="
13+
hugo --gc --minify -b $URL --verbose --debug --logLevel info
14+
15+
echo "=== Running Pagefind indexing ==="
16+
pnpm dlx pagefind --source 'public' --verbose
17+
18+
echo "=== Build completed successfully ==="
19+
"""
320
publish = "public"
421

522
[build.environment]
623
HUGO_VERSION = "0.149.1"
724
NODE_VERSION = "20.0.0"
825
HUGO_ENABLEGITINFO = "true"
26+
HUGO_LOG_I18N_WARNINGS = "true"
27+
HUGO_LOG_WARNINGS = "true"
28+
FORCE_COLOR = "1"
29+
PNPM_LOG_LEVEL = "debug"
930

1031
[context.production.environment]
1132
HUGO_ENV = "production"
1233

1334
[context.deploy-preview]
14-
command = "pnpm install && hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
35+
command = """
36+
set -e
37+
echo "=== Deploy Preview Build ==="
38+
echo "Deploy URL: $DEPLOY_PRIME_URL"
39+
pnpm install --verbose
40+
hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL --verbose --debug --logLevel info
41+
pnpm dlx pagefind --source 'public' --verbose
42+
"""
1543

1644
[context.branch-deploy]
17-
command = "pnpm install && hugo --gc --minify -b $DEPLOY_PRIME_URL"
45+
command = """
46+
set -e
47+
echo "=== Branch Deploy Build ==="
48+
echo "Deploy URL: $DEPLOY_PRIME_URL"
49+
pnpm install --verbose
50+
hugo --gc --minify -b $DEPLOY_PRIME_URL --verbose --debug --logLevel info
51+
pnpm dlx pagefind --source 'public' --verbose
52+
"""
1853

1954
[[plugins]]
2055
package = "netlify-plugin-hugo-cache-resources"

0 commit comments

Comments
 (0)