From 0efa73520b94e04229009a19cdbc5259b5333b8c Mon Sep 17 00:00:00 2001 From: julius zeidler Date: Fri, 13 Jan 2023 00:53:41 +0100 Subject: [PATCH] pipeline --- .github/workflows/deploy-docs.yml | 4 ++-- optimize.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 optimize.sh diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index f3ae57b1..2daeae09 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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: diff --git a/optimize.sh b/optimize.sh new file mode 100755 index 00000000..d99a2fee --- /dev/null +++ b/optimize.sh @@ -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}" \ No newline at end of file