From 3997692e200c446941474d1e8a4e9344408f3c9c Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Sat, 2 Sep 2023 20:55:43 +0200 Subject: [PATCH] Deploy assets from CI --- .gitea/workflows/build.yml | 14 ++++++++++++++ Makefile | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4bbff69..e23fa42 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,3 +15,17 @@ jobs: - name: Build run: | make build + - name: Install MinIO client + run: | + download=$(https://dl.min.io/client/mc/release/linux-$(uname -m | sed 's/x86_64/amd64/')/mc) + echo $download + curl -sSL $download -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