From edf5cd66320f7b040da06adae3441efa211e9bc3 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Fri, 1 Nov 2024 23:45:08 +0100 Subject: [PATCH] Remove duplicate prettier command execution in CSS and JS formatting step --- .github/workflows/ci-build-site.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-build-site.yml b/.github/workflows/ci-build-site.yml index e4afe1eb..6e4b9402 100644 --- a/.github/workflows/ci-build-site.yml +++ b/.github/workflows/ci-build-site.yml @@ -108,16 +108,12 @@ jobs: - 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 - set -x - which prettier - echo $PATH - sudo echo $PATH - sudo which prettier - sudo prettier --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.css" - sudo prettier --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.js" - sudo prettier --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.css" - sudo prettier --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.js" + # store in a variable because with sudo $PATH is different + prettier_cmd=$(which prettier) + sudo $prettier_cmd --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.css" + sudo $prettier_cmd --write "${{ steps.set-dirs.outputs.old_dir }}/public/**/*.js" + sudo $prettier_cmd --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.css" + sudo $prettier_cmd --write "${{ steps.set-dirs.outputs.new_dir }}/public/**/*.js" - name: Remove itunes:subtitle from RSS feeds before comparison run: |