From e77c3c4ef22a0dddc88e0c480c51d4c332faa46c Mon Sep 17 00:00:00 2001 From: Bjorn Lammers Date: Sun, 5 Jan 2025 02:09:49 +0100 Subject: [PATCH] fix(ci): create svgo config if missing Signed-off-by: Bjorn Lammers --- .github/workflows/compress_icons.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/compress_icons.yml b/.github/workflows/compress_icons.yml index c7570e13..21decf6c 100644 --- a/.github/workflows/compress_icons.yml +++ b/.github/workflows/compress_icons.yml @@ -23,6 +23,15 @@ jobs: sudo apt-get install -y zopfli webp npm npm install -g svgo + - name: Create svgo.config.js if Missing + run: | + if [ ! -f "svgo.config.js" ]; then + echo "Creating svgo.config.js..." + echo "module.exports = { plugins: [{ removeViewBox: false }, { cleanupIDs: false }] };" > svgo.config.js + else + echo "svgo.config.js already exists." + fi + - name: Compress PNG Files run: | echo "Compressing PNGs..."