Widget load improvements #3955
Workflow file for this run
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: Stencilbook | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| workflow_dispatch: | |
| # not sure why this was needed, commenting out to see if anything breaks | |
| # env: | |
| # ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| jobs: | |
| deploy: | |
| name: Deploy to static site bucket | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - mint-components | |
| - bedrock-components | |
| - paypal-components | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # de0fa = v6.0.2 | |
| - name: Node Setup | |
| id: setup-node | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # 53b83 = v6.3.0 | |
| with: | |
| node-version: 22.x | |
| - name: Install npm dependencies | |
| id: install-deps | |
| run: cd packages/${{ matrix.package }} && npm ci | |
| - name: Build | |
| id: build | |
| run: cd packages/${{ matrix.package }} && NODE_ENV=dev npm run build | |
| - name: Authenticate with Google Cloud | |
| id: auth | |
| uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # 7c6bc = v3 | |
| with: | |
| token_format: "access_token" | |
| workload_identity_provider: "projects/167728399658/locations/global/workloadIdentityPools/github/providers/github" | |
| service_account: "github-static-site-actions@static-site-proxy.iam.gserviceaccount.com" | |
| - name: Setup GCP | |
| id: setup-gcp | |
| uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # aa548 = v3.0.1 | |
| - name: Deploy to bucket (pull request) | |
| id: deploy-to-bucket-pr | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: gsutil -m rsync -d -r packages/${{ matrix.package }}/www/ gs://stencilbook_static_saasquatch/${{ matrix.package }}/pr${{ github.event.number }}/ | |
| - name: Deploy to bucket (push) | |
| id: deploy-to-bucket-push | |
| if: ${{ github.event_name == 'push' }} | |
| run: gsutil -m rsync -d -r packages/${{ matrix.package }}/www/ gs://stencilbook_static_saasquatch/${{ matrix.package }}/production/ |