mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-18 14:44:43 -04:00
content: Improve GitLab Pages compression performance
This commit is contained in:
parent
172bfbc4b4
commit
6ab5ae6dfb
@ -59,8 +59,9 @@ pages:
|
|||||||
# Build
|
# Build
|
||||||
- hugo --gc --minify --baseURL ${CI_PAGES_URL}
|
- hugo --gc --minify --baseURL ${CI_PAGES_URL}
|
||||||
# Compress
|
# Compress
|
||||||
- find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec gzip -f -k {} \;
|
- find public/ -type f -regextype posix-extended -regex '.+\.(css|html|js|json|mjs|svg|txt|xml)$' -print0 > files.txt
|
||||||
- find public -type f -regex '.*\.\(css\|html\|js\|txt\|xml\)$' -exec brotli -f -k {} \;
|
- time xargs --null --max-procs=0 --max-args=1 brotli --quality=10 --force --keep < files.txt
|
||||||
|
- time xargs --null --max-procs=0 --max-args=1 gzip -9 --force --keep < files.txt
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
Loading…
x
Reference in New Issue
Block a user