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

Additional option --copy-original-files when outputPath is provided #94

Open
do-me opened this issue Feb 28, 2022 · 0 comments
Open

Additional option --copy-original-files when outputPath is provided #94

do-me opened this issue Feb 28, 2022 · 0 comments
Milestone

Comments

@do-me
Copy link

do-me commented Feb 28, 2022

Thanks a lot for this amazing repo!

I'm currently setting up a GitHub action based on gzipper and noticed that until now, there is no option to simply copy the original files to the (newly created) outputPath directory first. This would come in really handy for immediate deployment however.

Hence I propose --copy-original-files flag for this purpose as a possible enhancement.

If anyone needs a workaround follow these step:

  1. Copy the uncompressed, original files to the compressed-branch
  2. Use this branch as in- and output (in my case gh-pages)

Step 2. can be done like this:

      # check out other branch (gh-pages) 
      - uses: actions/checkout@v2
        with:
          ref: gh-pages

      # compress all files in all directories
      - run: gzipper compress --include htm,html,css,js,svg,xml,map,json,img,png,jpg,jpeg --zopfli --brotli --remove-larger .

      # commit
      - uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Compress Files
          branch: gh-pages
          push_options: '--force'

Find the full action with mkdocs deploy here.

@gios gios added this to the Backlog milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants