Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Liudon authored Oct 18, 2024
1 parent 7cbe86a commit 6dd906f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,28 @@ jobs:

- name: Compress Image
run: |
sudo apt-get update
sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev liblcms2-dev \
libopenexr-dev libtiff-dev libraw-dev libheif-dev libde265-dev \
libfftw3-dev libglib2.0-dev libwebp-dev
wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.*
./configure
make
sudo make install
sudo ldconfig /usr/local/lib
# sudo apt-get update
# sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
# libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev liblcms2-dev \
# libopenexr-dev libtiff-dev libraw-dev libheif-dev libde265-dev \
# libfftw3-dev libglib2.0-dev libwebp-dev
# wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
# tar xvzf ImageMagick.tar.gz
# cd ImageMagick-7.*
# ./configure
# make
# sudo make install
# sudo ldconfig /usr/local/lib
# cd ../
wget 'https://imagemagick.org/archive/binaries/magick'
chmod +x magick
sudo mv magick /usr/local/bin/
magick --version
cd ../
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick {} -pointsize 48 -fill "#909090" -font ./static/ArchitectsDaughter-Regular.ttf -gravity south -annotate +0+20 "@liudon\nhttps://liudon.com" -resize 1080x\> {} \;
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick {} -quality 75 -define webp:image-hint=photo {}_1080x.webp \;
find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick {} {}_1080x.avif \;
Expand Down

0 comments on commit 6dd906f

Please sign in to comment.