Skip to content

Commit

Permalink
Add Prettier for CSS and JS formatting in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Nov 1, 2024
1 parent 58db98a commit fa71df8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci-build-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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#<itunes:subtitle>.*</itunes:subtitle>##' ${{ steps.set-dirs.outputs.old_dir }}/public/podcast-archives-short.rss
Expand Down

0 comments on commit fa71df8

Please sign in to comment.