From f457057d09d1308183fed0aeec1d3fcf580ce7e1 Mon Sep 17 00:00:00 2001 From: Liudon Date: Sun, 29 Sep 2024 20:50:23 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b9850383..7e86fb3fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: - name: Compress Image uses: jruipinto/ImageMagick-action@v1 with: - command: find ./content/posts -type f $ -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" $ -exec sh -c 'convert "$1" "${1%.*}.webp" && convert "$1" "${1%.*}.avif"' _ {} \; + command: find ./content/posts/ -type f $ -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" $ -exec sh -c 'for img; do convert "$img" "${img%.*}.webp" && convert "$img" "${img%.*}.avif"; done' _ {} + github_pages: name: Build and Publish Github Pages