Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Liudon authored Sep 29, 2024
1 parent d005858 commit 31c8678
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ jobs:
# sudo mv ./linux-generic/cavif /bin
# # find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec cavif {} \;

- uses: mfinelli/setup-imagemagick@v5
- name: Compress Image
uses: jruipinto/ImageMagick-action@v1
with:
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 {} +
run: |
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick convert {} {}.webp \;
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick convert {} {}.avif \;
ls -l ./content/posts/building-a-workout-page/
github_pages:
name: Build and Publish Github Pages
Expand Down

0 comments on commit 31c8678

Please sign in to comment.