parent
933f6ecc10
commit
29d98d86a0
5 changed files with 41 additions and 0 deletions
|
@ -7,3 +7,5 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: sleep
|
- name: sleep
|
||||||
uses: ./actions/sleep-two
|
uses: ./actions/sleep-two
|
||||||
|
- name: sleep
|
||||||
|
uses: ./actions/sleep-three
|
||||||
|
|
11
actions/sleep-three/Dockerfile
Normal file
11
actions/sleep-three/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
openssh \
|
||||||
|
rsync \
|
||||||
|
git
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
7
actions/sleep-three/README.md
Normal file
7
actions/sleep-three/README.md
Normal file
|
@ -0,0 +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.
|
||||||
|
|
||||||
|
|
5
actions/sleep-three/action.yml
Normal file
5
actions/sleep-three/action.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
name: 'sleep'
|
||||||
|
despriction: 'sleep'
|
||||||
|
runs:
|
||||||
|
using: 'docker'
|
||||||
|
image: 'Dockerfile'
|
16
actions/sleep-three/entrypoint.sh
Normal file
16
actions/sleep-three/entrypoint.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
apk add --no-cache \
|
||||||
|
brotli \
|
||||||
|
gzip \
|
||||||
|
hugo
|
||||||
|
|
||||||
|
echo 'hello'
|
||||||
|
|
||||||
|
hugo
|
||||||
|
|
||||||
|
find ./public -type f -regex ".*\.\(css\|html\|js\|json\|svg\|xml\)$" \
|
||||||
|
-exec brotli --best -f {} \+ \
|
||||||
|
-exec gzip --best -k -f {} \+
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in a new issue