[hugo] feat: use copy instead of git clone
All checks were successful
Build and Publish / Build (push) Successful in 43s
Build and Publish / Deployment (push) Successful in 5s

This commit is contained in:
Simon Cornet 2024-10-14 11:03:47 +02:00
parent 1c85a0cfd0
commit f65eb28575

View File

@ -5,15 +5,22 @@ ARG GITEA_SHA=some_sha
RUN echo $GITEA_SHA RUN echo $GITEA_SHA
# clone site and template # clone site and template
RUN set -e \ COPY . /src
&& git clone --recursive https://git.simoncor.net/siempie/simoncor.net.git /site
# generate site # generate site
RUN set -e \ RUN set -e \
&& /usr/local/bin/hugo --source=/site/ && /usr/local/bin/hugo --source=/src/
# copy public content
RUN set -e \
&& cp -r /src/public /site/
# cleanup
RUN set -e \
&& rm -rf /src
# expose 80 # expose 80
EXPOSE 80 EXPOSE 80
# start static-web-server # start static-web-server
ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=80", "--root=/site/public/"] ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=80", "--root=/site/"]