added image optimization to pipeline

This commit is contained in:
julius zeidler 2023-01-13 00:45:36 +01:00
parent dca882bccd
commit 2253624aab

View file

@ -29,6 +29,9 @@ jobs:
- name: Install Deps
run: yarn install --frozen-lockfile
- name: optimize images
run: "npx sharp-cli resize 800 --withoutEnlargement true --optimise true --progressive true --withMetadata false --input $(find ./docs \( -name cache -prune \) -o -name '*' -type f -exec file {} \; | awk -F: '{ if ($2 ~/[Ii]mage|EPS/) print $1}') --output '{dir}/{base}'"
- name: Build Docs
env:
NODE_OPTIONS: --max_old_space_size=4096