Commit 1f2db754 authored by Tom Quirk's avatar Tom Quirk

Compress all assets for pages deploy

Compresses every asset file with gzip and brotli in
the public/ directory, in preparation for the
page:deploy.
parent 5695800c
.compress-public: &compress-public
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|json\|css\|svg\|xml\)$' -exec gzip -f -k {} \;
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|json\|css\|svg\|xml\)$' -exec brotli -f -k {} \;
pages: pages:
extends: extends:
- .default-retry - .default-retry
...@@ -9,6 +13,8 @@ pages: ...@@ -9,6 +13,8 @@ pages:
- karma - karma
- compile-production-assets - compile-production-assets
- compile-storybook - compile-storybook
before_script:
- apt-get update && apt-get -y install brotli gzip
script: script:
- mv public/ .public/ - mv public/ .public/
- mkdir public/ - mkdir public/
...@@ -17,7 +23,7 @@ pages: ...@@ -17,7 +23,7 @@ pages:
- mv coverage-javascript/ public/coverage-javascript/ || true - mv coverage-javascript/ public/coverage-javascript/ || true
- mv storybook/public public/storybook || true - mv storybook/public public/storybook || true
- cp .public/assets/application-*.css public/application.css || true - cp .public/assets/application-*.css public/application.css || true
- cp .public/assets/application-*.css.gz public/application.css.gz || true - *compress-public
artifacts: artifacts:
paths: paths:
- public - public
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment