This commit is contained in:
julius zeidler 2023-01-13 00:53:41 +01:00
parent 2253624aab
commit 0efa73520b
2 changed files with 4 additions and 2 deletions

View file

@ -29,8 +29,8 @@ 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: Optimize Images
run: bash ./optimize.sh
- name: Build Docs
env:

2
optimize.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
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}"