Cash payouts GA Frontend Updates #3432
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: | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| jobs: | |
| deploy: | |
| name: Deploy to static site bucket | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - mint-components | |
| - bedrock-components | |
| - paypal-components | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Node Setup | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18.x | |
| - name: Setup private NPM registries | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| IMPACT_PACKAGE_TOKEN: ${{ secrets.IMPACT_PACKAGE_TOKEN }} | |
| run: | | |
| cd packages/${{ matrix.package }} | |
| echo "//npm.pkg.github.com/saasquatch/:_authToken=$GITHUB_TOKEN" >> ./.npmrc | |
| echo "//npm.pkg.github.com/impactinc/:_authToken=$IMPACT_PACKAGE_TOKEN" >> ./.npmrc | |
| echo "@saasquatch:registry=https://npm.pkg.github.com/saasquatch/" >> ./.npmrc | |
| echo "@impactinc:registry=https://npm.pkg.github.com/impactinc/" >> ./.npmrc | |
| - name: Install npm dependencies | |
| run: cd packages/${{ matrix.package }} && npm ci | |
| - name: Build | |
| run: cd packages/${{ matrix.package }} && NODE_ENV=dev npm run build | |
| - name: Authenticate with Google Cloud | |
| id: auth | |
| uses: google-github-actions/auth@v0 | |
| 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@v0 | |
| - name: Deploy to bucket (pull request) | |
| 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) | |
| if: ${{ github.event_name == 'push' }} | |
| run: gsutil -m rsync -d -r packages/${{ matrix.package }}/www/ gs://stencilbook_static_saasquatch/${{ matrix.package }}/production/ |