From 018f90c98e1c9ba58fd5932751788202d67fccc5 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Mon, 24 Nov 2025 02:23:33 -0800 Subject: [PATCH] refactor: update GitHub Actions workflow to correct object path for R2 uploads and streamline upload command --- .github/workflows/custom_build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/custom_build.yml b/.github/workflows/custom_build.yml index 7d7b1b0..4b2095c 100644 --- a/.github/workflows/custom_build.yml +++ b/.github/workflows/custom_build.yml @@ -179,14 +179,13 @@ jobs: # Determine artifact path with correct extension (with leading slash for storage) ARTIFACT_PATH="/${{ inputs.build_hash }}${FILE_EXT}" - # Object key for wrangler (without leading slash) - OBJECT_KEY="${{ inputs.build_hash }}${FILE_EXT}" + # Object path for wrangler is bucket/key without leading slash + OBJECT_PATH="${R2_BUCKET_NAME}/${{ inputs.build_hash }}${FILE_EXT}" update_status uploading # Upload to R2 with hash and correct extension - wrangler r2 object put "$OBJECT_KEY" \ - --file "$BUILD_FILE" \ - --bucket "$R2_BUCKET_NAME" + wrangler r2 object put "$OBJECT_PATH" \ + --file "$BUILD_FILE" # Update build with artifact path (with leading slash) curl -sSf -X POST "$CONVEX_URL/github-webhook" \