add dockerfile and entrypoint script
This commit is contained in:
parent
3bca6ebb73
commit
367cf479ab
3 changed files with 23 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache \
|
||||
brotli \
|
||||
gzip \
|
||||
hugo
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
@ -1,2 +1,7 @@
|
|||
# Forgejo-Action for building hugo pages
|
||||
|
||||
This Action builds a hugo site and runs both gzip and brotli on static text files so a properly configured webbrowser can serve those precompressed files
|
||||
|
||||
The compression only works on files in the "public" folder of the actions workdir.
|
||||
|
||||
|
||||
|
|
7
entrypoint.sh
Normal file
7
entrypoint.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
hugo
|
||||
find ./public -type f \
|
||||
-regex ".*\.\(css\|html\|js\|json\|svg\|xml\)$" \
|
||||
-exec brotli --best -f {} \+ \
|
||||
-exec gzip --best -k -f {} \+
|
Loading…
Reference in a new issue