diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4bbff69..d5e1e41 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,3 +15,15 @@ jobs: - name: Build run: | make build + - name: Install MinIO client + run: | + curl -sSL https://dl.min.io/client/mc/release/linux-$(uname -m | sed 's/x86_64/amd64/')/mc -o mc + chmod +x mc + mv mc /usr/local/bin/mc + command -v mc + - name: Configure MinIO client + run: | + mc alias set offen https://storage.offen.dev offen ${{ secrets.MINIO_SECRET_KEY }} + - name: Deploy + run: | + mc mirror --remove --overwrite ./output/ offen/software-website diff --git a/Makefile b/Makefile index f257ee0..fe85603 100644 --- a/Makefile +++ b/Makefile @@ -32,4 +32,4 @@ build: @docker create --entrypoint=bash --name assets offen/software-builder-website @docker cp assets:/code/website/output/. ./output/ @docker rm assets - @docker rmi offen/software-builder-website + @docker rmi offen/software-builder-website:latest diff --git a/build/Dockerfile b/build/Dockerfile index a3d5052..168d324 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -18,4 +18,4 @@ COPY ./build /code/build ARG siteurl ENV SITEURL=$siteurl -RUN make publish +RUN make publish && rm -rf output/theme/.webassets-cache