Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide this as a GH Action #176

Open
hoijui opened this issue Jan 25, 2024 · 1 comment
Open

Provide this as a GH Action #176

hoijui opened this issue Jan 25, 2024 · 1 comment

Comments

@hoijui
Copy link

hoijui commented Jan 25, 2024

This could make sense for (at least) anyone that uses static site generators on GH Pages, as a post-processing step.
That is a huge potential clientele!

Somewhat related to #30.

@eumas42
Copy link

eumas42 commented Apr 2, 2024

I have handled it the following way. Might be not the best, but does its job

- name: "Minify"
  run: |
    set -x
    CHECKSUM_EXPECTED="e848a60abfd92441fd8eca99281074c166f6a7ce8e05eea3d8033c49ea66524d"
    wget https://github.com/wilsonzlin/minify-html/releases/download/v0.15.0/minhtml-0.15.0-x86_64-unknown-linux-gnu
    
    if ! (echo "$CHECKSUM_EXPECTED minhtml-0.15.0-x86_64-unknown-linux-gnu" | sha256sum -c --status); then
      echo "File corrupt!!!"
      exit 1
    fi
    chmod u+x minhtml-0.15.0-x86_64-unknown-linux-gnu
    ./minhtml-0.15.0-x86_64-unknown-linux-gnu --keep-closing-tags --minify-css ./mysite/*.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants