Skip to content

Commit

Permalink
Fix build error to deploy to CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni authored and marcospassos committed Apr 23, 2020
1 parent 8973059 commit 53acdf1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/deploy-published-releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 53acdf1

Please sign in to comment.