[Git][NTPsec/ntpsec][master] Compress HTML, CSS and JS when deployed to GitLab pages

Matt Selsky gitlab at mg.gitlab.com
Wed Jul 18 23:14:53 UTC 2018


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
29402e6a by Matt Selsky at 2018-07-18T05:13:22Z
Compress HTML, CSS and JS when deployed to GitLab pages

See https://docs.gitlab.com/ee/user/project/pages/introduction.html#serving-compressed-assets

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -4,9 +4,10 @@ pages:
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev asciidoc
     - python ./waf configure --enable-doc --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ build install
-    - cp www/favicon.ico `pwd`/public
-    - cp docs/top.html.in `pwd`/public/index.html
-    - cp docs/top-asciidoc.css `pwd`/public/asciidoc.css
+    - cp www/favicon.ico public
+    - cp docs/top.html.in public/index.html
+    - cp docs/top-asciidoc.css public/asciidoc.css
+    - find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
   allow_failure: true
   artifacts:
     paths:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/29402e6a5aa6e51a57cf629185eef2835639ab4e

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/29402e6a5aa6e51a57cf629185eef2835639ab4e
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180718/f1255cac/attachment.html>


More information about the vc mailing list