Skip to content

Commit

Permalink
Create optimize-assets.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaGorceva authored Oct 24, 2024
1 parent bb88f18 commit 4ec2404
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/workflows/optimize-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Optimize Assets

on:
push:
branches:
- main

jobs:
optimize:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

# Image compression using calibreapp/image-actions
- name: Optimize Images
uses: calibreapp/[email protected]
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}

# Minify CSS using cssnano-cli
- name: Minify CSS
run: |
npm install -g cssnano-cli
cssnano styles.css styles.min.css
# Minify JS using terser
- name: Minify JS
run: |
npm install -g terser
terser script.js -o script.min.js

0 comments on commit 4ec2404

Please sign in to comment.