yams.media/build.sh
Roger Gonzalez 4167eff2c8
All checks were successful
Hugo Build and Deploy (FR) / Build Hugo Site (pull_request) Successful in 5s
Hugo Build and Deploy (FR) / Deploy to Server (fr-translation) (pull_request) Has been skipped
Add --noCache flag to hugo build
- Adds the --noCache flag to the hugo build command.
- This prevents hugo from using cached data during builds.
- Improves build consistency and avoids potential stale content.
2025-05-14 21:02:31 -03:00

12 lines
318 B
Bash
Executable File

#!/bin/bash
find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.png}.webp"' _ {} \;
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
hugo -s . -d /var/www/fr.yams.media/ \
--minify \
--cleanDestinationDir \
--gc \
--verbose \
--noCache