chore: fix build & emulation

This commit is contained in:
41666 2021-08-01 16:37:33 -04:00
parent 462ef26ea2
commit 3ca37cff17
5 changed files with 13 additions and 7 deletions

View file

@ -60,7 +60,7 @@ jobs:
- name: Check if already deployed
id: check
run: |
gsutil stat gs://roleypoly-artifacts/backend-worker/${{ github.sha }}/script.js \
gsutil stat gs://roleypoly-artifacts/workers/${{ github.sha }}/${{ matrix.worker }}.js \
&& echo ::set-output name=skip::1 \
|| echo ::set-output name=skip::0
@ -86,16 +86,17 @@ jobs:
- run: |
wrangler init
echo 'webpack_config = "packages/api/webpack.config.js"' | tee -a wrangler.toml
echo 'webpack_config = "packages/${{ matrix.worker }}/webpack.config.js"' | tee -a wrangler.toml
wrangler build
mv worker/script.js worker/${{ matrix.worker }}.js
if: steps.check.outputs.skip == '0'
- id: upload-file
if: github.event_name == 'push' && steps.check.outputs.skip == '0'
uses: google-github-actions/upload-cloud-storage@main
with:
path: worker/script.js
destination: roleypoly-artifacts/backend-worker/${{ github.sha }}
path: worker/${{ matrix.worker }}.js
destination: roleypoly-artifacts/workers/${{ github.sha }}
credentials: ${{ secrets.GCS_TF_KEY }}
docker_build: