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.
- Node.js v18.12.1
- Minify v9.1.0
- Optinal: create .minify.json in root folder
{
"html": {
"removeAttributeQuotes": false
},
"css": {
"compatibility": "*"
},
"js": {
"ecma": 2020,
"module": true
}
}- Add
minifystep 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
# ...