mirror of
https://github.com/Smaug123/static-site-pipeline
synced 2025-10-10 02:09:00 +00:00
Initial commit of new flow
This commit is contained in:
12
docker/hugo/Dockerfile
Normal file
12
docker/hugo/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM alpine:3.15.4
|
||||
RUN apk add --no-cache hugo=0.89.4-r2 git-2.34.8-r0
|
||||
COPY "build.sh" "/build.sh"
|
||||
|
||||
RUN chmod +x /build.sh && \
|
||||
mkdir /sentinels && \
|
||||
chmod a+rwx /sentinels && \
|
||||
addgroup -S hugo && adduser -S hugo -G hugo
|
||||
|
||||
USER hugo
|
||||
|
||||
ENTRYPOINT []
|
7
docker/hugo/build.sh
Executable file
7
docker/hugo/build.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOURCE_DIR=$(readlink -f "$1")
|
||||
OUTPUT_DIR=$(readlink -f "$2")
|
||||
|
||||
rm -rf "${OUTPUT_DIR:?}/*" && \
|
||||
hugo --minify --source "$SOURCE_DIR" --destination "$OUTPUT_DIR"
|
Reference in New Issue
Block a user