From 53acdf1a3d943e45ea53e650725e64742d8e372d Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Wed, 22 Apr 2020 21:15:46 -0300 Subject: [PATCH] Fix build error to deploy to CDN --- .../workflows/deploy-published-releases.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index 1aec6b6b5..17641bef9 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -54,22 +54,24 @@ jobs: name: bundle path: build - - name: npm publish - run: |- - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - npm publish --access public - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Authenticate to GCP uses: GoogleCloudPlatform/github-actions/setup-gcloud@master with: - version: 285.0.1 + version: 290.0.0 service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} - name: Deploy to GCS + env: + GCLOUD_BUCKET: ${{ secrets.GCLOUD_BUCKET }} run: |- gsutil -m cp build/plug.min.js "gs://${GCLOUD_BUCKET}/js/v1/lib/plug.js" # Allow for faster updates during beta, should be removed once its stable enough to distribute over global cdn gsutil -m setmeta -h "Cache-Control: no-cache, no-store, no-transform" "gs://${GCLOUD_BUCKET}/js/lib/plug.js" + + - name: npm publish + run: |- + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc + npm publish --access public + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}