name: Deploy on production on: release: types: - published permissions: contents: read jobs: deploy: name: Deploy on production runs-on: node-minio steps: - uses: actions/checkout@v4 - name: Install Git LFS - run: | apt-get update apt-get install -y git-lfs - name: Checkout LFS run: | git lfs install --local AUTH=$(git config --local http.${{ gitea.server_url }}/.extraheader) git config --local --unset http.${{ gitea.server_url }}/.extraheader git config --local http.${{ gitea.server_url }}/${{ gitea.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH" git lfs pull - name: Set alias run: | mc alias set minio "${{ vars.S3_PROD_URL }}" "${{ secrets.S3_PROD_ACCESS_KEY }}" "${{ secrets.S3_PROD_SECRET_KEY }}" - name: Install dependencies run: | npm install - name: Run build run: | npm run build - name: Upload assets to MinIO shell: bash run: | set -euo pipefail BUCKET="${{ vars.S3_PROD_BUCKET_NAME }}" BUILD_ID=$(date -u +%Y-%m-%d)-$(git rev-parse --short HEAD) echo "Build ID: $BUILD_ID" mkdir -p ./dist mc cp --recursive ./dist/ "minio/$BUCKET/builds/$BUILD_ID" echo "Copied files successfully"