Skip to content

Commit

Permalink
gitlab-ci : compression fichiers
Browse files Browse the repository at this point in the history
  • Loading branch information
eyssette committed Aug 20, 2024
1 parent 4a48268 commit b029b25
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions static/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
variables:
FILES_TO_COMPRESS: "htm html txt text js css md ico svg"

pages:
image: alpine:latest
before_script:
- apk update && apk add gzip brotli
script:
- mkdir .public
- cp -r * .public
- mv .public public
- for ext in $FILES_TO_COMPRESS; do find public -type f -name "*.$ext" -exec gzip -f -k {} \;; done
- for ext in $FILES_TO_COMPRESS; do find public -type f -name "*.$ext" -exec brotli -f -k {} \;; done
artifacts:
paths:
- public
only:
- gh-pages
rules:
- if: $CI_COMMIT_BRANCH == "gh-pages"

0 comments on commit b029b25

Please sign in to comment.