Skip to content

Commit 9cbe813

Browse files
authored
Update main.yml
1 parent 513b764 commit 9cbe813

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ 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+
- name: Compress Image
52+
uses: jruipinto/ImageMagick-action@v1
53+
with:
54+
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"' _ {} \;
55+
5156
github_pages:
5257
name: Build and Publish Github Pages
5358
uses: ./.github/workflows/gh-pages.yml

0 commit comments

Comments
 (0)