diff --git a/.gitea/workflows/build_and_push.yaml b/.gitea/workflows/build_and_push.yaml index 7be4622..b347509 100644 --- a/.gitea/workflows/build_and_push.yaml +++ b/.gitea/workflows/build_and_push.yaml @@ -25,12 +25,26 @@ jobs: ~/.resources/ key: bglug-it-hugo-resources + - name: Build Hugo + uses: lowply/build-hugo@v0.129.0 + with: + args: --gc --minify --cleanDestinationDir + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker BuildX uses: docker/setup-buildx-action@v3 + # - name: Save Primes + # id: cache-primes-save + # uses: actions/cache/save@v4 + # with: + # path: | + # path/to/dependencies + # some/other/dependencies + # key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }} + # - name: Login to registry # uses: docker/login-action@v3 # with: diff --git a/Dockerfile b/Dockerfile index 559e031..aecb0db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,3 @@ -FROM git.libreschool.org/bglug/hugo-extended:latest AS hugobuild - -COPY . /src - -RUN \ - mkdir -p /out && \ - hugo -s /src --gc --minify --cleanDestinationDir -d /out - FROM alpine:latest RUN \ @@ -16,7 +8,7 @@ RUN \ chmod -R a-x,a=rX,ug+w /wwwroot /logs COPY docker/rootfs / -COPY --from=hugobuild --chown=nginx:www-data --chmod=a-x,a=rX,ug+w /out /wwwroot/ +COPY --chown=nginx:www-data --chmod=a-x,a=rX,ug+w public/ /wwwroot/ # config test RUN nginx -t