mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Compress more when deploying to prod
Use 50 zopfli zopfli iterations when compressing for staging, but a full 1200 when compressing for prod.
This commit is contained in:
parent
9fdca311c0
commit
1a89830880
2 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,7 @@ packages:
|
||||||
- npm # for testing with lighthouse and webhint
|
- npm # for testing with lighthouse and webhint
|
||||||
- chromium # for testing with lighthouse and webhint
|
- chromium # for testing with lighthouse and webhint
|
||||||
environment:
|
environment:
|
||||||
HINT_TELEMETRY: off
|
HINT_TELEMETRY: "off"
|
||||||
sources:
|
sources:
|
||||||
- https://git.sr.ht/~seirdy/seirdy.one
|
- https://git.sr.ht/~seirdy/seirdy.one
|
||||||
secrets:
|
secrets:
|
||||||
|
@ -24,11 +24,12 @@ tasks:
|
||||||
mkdir -p ~/bin
|
mkdir -p ~/bin
|
||||||
tar x -ozC ~/bin -f binaries.tar.gz
|
tar x -ozC ~/bin -f binaries.tar.gz
|
||||||
cd seirdy.one
|
cd seirdy.one
|
||||||
npm i -D
|
npm i -D --no-fund
|
||||||
- build_deploy: |
|
- build_deploy: |
|
||||||
cd seirdy.one
|
cd seirdy.one
|
||||||
export PATH=~/bin:$PATH
|
export PATH=~/bin:$PATH
|
||||||
make DOMAIN=staging.seirdy.one test-staging
|
# don't spend as much time compressing for staging.
|
||||||
|
make DOMAIN=staging.seirdy.one ZOPFLI_ITERATIONS=50 test-staging
|
||||||
tar czf ~/lighthouse-reports.tar.gz lighthouse-reports
|
tar czf ~/lighthouse-reports.tar.gz lighthouse-reports
|
||||||
make clean deploy
|
make clean deploy
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -12,6 +12,7 @@ GEMINI_RSYNC_DEST = $(USER):$(GEMINI_ROOT)
|
||||||
|
|
||||||
OUTPUT_DIR = public
|
OUTPUT_DIR = public
|
||||||
RSYNCFLAGS += -rlvz --zc=zstd
|
RSYNCFLAGS += -rlvz --zc=zstd
|
||||||
|
ZOPFLI_ITERATIONS=1200 # max compression
|
||||||
|
|
||||||
.PHONY: hugo
|
.PHONY: hugo
|
||||||
hugo: clean
|
hugo: clean
|
||||||
|
@ -65,7 +66,7 @@ build: hugo
|
||||||
ifndef NO_GZIP_STATIC
|
ifndef NO_GZIP_STATIC
|
||||||
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.webmanifest' \
|
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.webmanifest' \
|
||||||
| grep -v gemini \
|
| grep -v gemini \
|
||||||
| xargs zopfli --i50 --gzip
|
| xargs zopfli --i$(ZOPFLI_ITERATIONS) --gzip
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue