Skip to content

Github Action to minify js, html, and css for Github Pages

License

Notifications You must be signed in to change notification settings

DrA1ex/pages-minify

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minify Action

GitHub release MIT license

This is an updated version of original repository.

Github Action to minify js, css, and html files pushed to a branch, using the Minify package.

Versions

  • Node.js v18.12.1
  • Minify v9.1.0

Usage

  1. Optinal: create .minify.json in root folder
{
    "html": {
        "removeAttributeQuotes": false
    },
    "css": {
        "compatibility": "*"
    },
    "js": {
        "ecma": 2020,
        "module": true
    }
}
  1. Add minify step right after checkout in default GitHub Pages build action
# ...

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Minify Action
        uses: dra1ex/minify-action@v1.0.3
# ...

About

Github Action to minify js, html, and css for Github Pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 66.4%
  • Dockerfile 33.6%