1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-25 00:16:06 -05:00

add optipng step to CI

This commit is contained in:
2019-11-08 12:11:07 -05:00
parent a9f52bffbd
commit 32e1aa8098

View File

@@ -36,10 +36,13 @@ jobs:
# just a little lossily (is that a word?) # just a little lossily (is that a word?)
- name: Optimize processed images - name: Optimize processed images
run: | run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends pngquant jpegoptim sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jpegoptim pngquant optipng
cd $HOME/gh-pages/notes cd $HOME/gh-pages/notes
find . -iname "*.jp*" -print0 | xargs -0 jpegoptim --max=80 --strip-all find . -iname "*.jp*" -print0 | xargs -0 jpegoptim --max=80 --strip-all
find . -iname "*.png" -print0 | xargs -0 pngquant --quality=60-65 --speed 1 --ext=.png --force --verbose find . -iname "*.png" -print0 | xargs -0 pngquant --quality=50-70 --speed 3 --ext=.png --force
find . -iname "*.png" -print0 | xargs -0 optipng -o2 -force -strip all -quiet --
# Ignore errors - override pipefail
shell: bash {0}
# Initialize a sub-repository in the new gh-pages directory and # Initialize a sub-repository in the new gh-pages directory and
# add jakejarvis/jakejarvis.github.io as a remote. # add jakejarvis/jakejarvis.github.io as a remote.