From 87878b0ee6b8ed45d1f34c66aab726b960f08c12 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Tue, 18 Aug 2026 11:21:29 -0400 Subject: [PATCH] fix(ci): use gcloud storage rsync with --delete-unmatched-destination-objects --- .github/workflows/sync-index-gcs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync-index-gcs.yml b/.github/workflows/sync-index-gcs.yml index 21afc15..fee96f2 100644 --- a/.github/workflows/sync-index-gcs.yml +++ b/.github/workflows/sync-index-gcs.yml @@ -31,13 +31,13 @@ jobs: # Secret containing the full service account JSON key credentials_json: ${{ secrets.GCP_SA_KEY }} - - name: Install gsutil - run: pip install -U gsutil + - name: Setup gcloud + uses: google-github-actions/setup-gcloud@v2 - name: Sync ./index/ to GCS - # -d deletes remote objects that no longer exist locally, - # so the bucket stays an exact mirror of ./index/ - run: gsutil -m rsync -r -d ./index/ "gs://${GCS_BUCKET}/${GCS_PREFIX}/" + # --delete-unmatched-destination-objects removes remote objects that no + # longer exist locally, so the bucket stays an exact mirror of ./index/ + run: gcloud storage rsync ./index/ "gs://${GCS_BUCKET}/${GCS_PREFIX}/" --recursive --delete-unmatched-destination-objects - name: Verify public index.json run: |