Some checks failed
Deploy Website / Deploy Hugo Site (push) Failing after 3s
- Removes the GitLab mirroring workflow. - Replaces the existing website deployment workflow with a new Gitea Actions workflow. - The new workflow uses SSH to deploy to a remote server. - Adds a `build.sh` script to convert images to WebP format. - The deployment workflow now clears Cloudflare cache. - The old workflow used an external action for Cloudflare cache clearing.
12 lines
678 B
Bash
12 lines
678 B
Bash
#!/bin/bash
|
|
|
|
find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.png}.webp"' _ {} \;
|
|
find ./ -type f -name '*.jpg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.jpg}.webp"' _ {} \;
|
|
find ./ -type f -name '*.jpeg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless "$1" -o "${1%.jpeg}.webp"' _ {} \;
|
|
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpg/\.webp/g' {} \;
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpeg/\.webp/g' {} \;
|
|
|
|
hugo -s . -d /var/www/montevideo.restaurant/ --minify --cacheDir $PWD/hugo-cache
|