Skip to content

Commit 31c8678

Browse files
authored
Update main.yml
1 parent d005858 commit 31c8678

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ jobs:
4848
# sudo mv ./linux-generic/cavif /bin
4949
# # find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec cavif {} \;
5050

51+
- uses: mfinelli/setup-imagemagick@v5
5152
- name: Compress Image
52-
uses: jruipinto/ImageMagick-action@v1
53-
with:
54-
command: find ./content/posts/ -type f ( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" ) -exec sh -c 'for img; do convert "$img" "${img%.*}.webp" && convert "$img" "${img%.*}.avif"; done' sh {} +
53+
run: |
54+
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick convert {} {}.webp \;
55+
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick convert {} {}.avif \;
56+
ls -l ./content/posts/building-a-workout-page/
5557
5658
github_pages:
5759
name: Build and Publish Github Pages

0 commit comments

Comments
 (0)