diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..347e56d --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,18 @@ +name: Publish to bucket +run-name: Deploy to ${{ vars.S3_BUCKET }} on ${{ vars.S3_URL }} +on: + push: + branches: + - master + +jobs: + publish: + name: deploy + runs-on: ubuntu-latest + container: + image: debian:trixie-slim + steps: + - run: apt update && apt install -y --no-install-recommends ca-certificates git minio-client + - run: git clone -b "${{ github.ref_name }}" --depth 1 --recurse-submodules --shallow-submodules "${{ github.server_url }}/${{ github.repository }}" src/ + - run: minio-client alias set s3 "${{ vars.S3_URL }}" "${{ secrets.AWS_ACCESS_KEY_ID }}" "${{ secrets.AWS_SECRET_ACCESS_KEY }}" + - run: minio-client mirror --dry-run --exclude ".*" ./ "s3/${{ vars.S3_BUCKET }}"