From fa71df8262530ca203002679816a582c2789bc6e Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Fri, 1 Nov 2024 23:26:05 +0100 Subject: [PATCH] Add Prettier for CSS and JS formatting in CI workflow --- .github/workflows/ci-build-site.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci-build-site.yml b/.github/workflows/ci-build-site.yml index d2c5699e..4e3c3f08 100644 --- a/.github/workflows/ci-build-site.yml +++ b/.github/workflows/ci-build-site.yml @@ -103,6 +103,17 @@ jobs: # Copy the generated manifest.json from the new build cp ${{ steps.set-dirs.outputs.new_dir }}/hugo/data/manifest.json ${{ steps.set-dirs.outputs.new_dir }}/manifest.json + - name: Install Prettier + run: npm install -g prettier + + - name: Prettify CSS and JS in public directories + run: | + # Format all CSS and JS files in both old and new public directories for easier comparison + prettier --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.css" + prettier --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.js" + prettier --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.css" + prettier --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.js" + - name: Remove itunes:subtitle from RSS feeds before comparison run: | sed -i 's#.*##' ${{ steps.set-dirs.outputs.old_dir }}/public/podcast-archives-short.rss