From 40ace55384f7b7785b6f8ef4079cfccbedcd387b Mon Sep 17 00:00:00 2001 From: Pascal Syma Date: Tue, 25 Aug 2026 17:52:46 +0200 Subject: [PATCH] Add CD --- .gitea/workflows/deploy.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..79a0f4d --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,64 @@ +name: Deploy static content to Pages + +on: + push: + branches: [ "main" ] + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy-pages: + environment: + name: github-pages + runs-on: ubuntu-latest + env: + BASE: /weedmap/ + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + - run: bun install --include=dev + - name: Build project + run: bun run build + - name: Minio Deploy + uses: passidel/minio-deploy-action@v1 + with: + endpoint: ${{ secrets.MINIO_ENDPOINT }} + access_key: ${{ secrets.MINIO_ACCESS_KEY }} + secret_key: ${{ secrets.MINIO_SECRET_KEY }} + bucket: 'swarm-static-websites' + source_dir: './dist' + target_dir: '/pascal.syma.dev/weedmap/' + deploy-prod: + environment: + name: github-pages + runs-on: ubuntu-latest + env: + BASE: / + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + - run: bun install --include=dev + - name: Build project + run: bun run build + - name: Minio Deploy + uses: passidel/minio-deploy-action@v1 + with: + endpoint: ${{ secrets.MINIO_ENDPOINT }} + access_key: ${{ secrets.MINIO_ACCESS_KEY }} + secret_key: ${{ secrets.MINIO_SECRET_KEY }} + bucket: 'swarm-static-websites' + source_dir: './dist' + target_dir: '/weed.syma.dev/'