|
1 | 1 | [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 | + """ |
3 | 20 | publish = "public" |
4 | 21 |
|
5 | 22 | [build.environment] |
6 | 23 | HUGO_VERSION = "0.149.1" |
7 | 24 | NODE_VERSION = "20.0.0" |
8 | 25 | HUGO_ENABLEGITINFO = "true" |
| 26 | + HUGO_LOG_I18N_WARNINGS = "true" |
| 27 | + HUGO_LOG_WARNINGS = "true" |
| 28 | + FORCE_COLOR = "1" |
| 29 | + PNPM_LOG_LEVEL = "debug" |
9 | 30 |
|
10 | 31 | [context.production.environment] |
11 | 32 | HUGO_ENV = "production" |
12 | 33 |
|
13 | 34 | [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 | + """ |
15 | 43 |
|
16 | 44 | [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 | + """ |
18 | 53 |
|
19 | 54 | [[plugins]] |
20 | 55 | package = "netlify-plugin-hugo-cache-resources" |
|
0 commit comments