rsync instead of two step delete and upload in GCP deploy #99
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release on Google Bucket | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: "auth" | |
| uses: "google-github-actions/auth@v2" | |
| with: | |
| workload_identity_provider: "projects/1019539084286/locations/global/workloadIdentityPools/github/providers/sourcify" | |
| service_account: "sourcify-docs-cd@sourcify-project.iam.gserviceaccount.com" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "22.4" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build | |
| - name: "setup-gcloud" | |
| uses: "google-github-actions/setup-gcloud@v2" | |
| - name: "sync-to-bucket" | |
| run: gcloud storage rsync build gs://sourcify-docs-bucket --recursive --delete-unmatched-destination-objects |