-
Notifications
You must be signed in to change notification settings - Fork 176
41 lines (39 loc) · 1.3 KB
/
bundle-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Bundle and Deploy Frontend
on:
workflow_call:
inputs:
environment:
required: true
type: string
near_wallet_env:
required: true
type: string
jobs:
bundle-frontend:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
defaults:
run:
working-directory: packages/frontend
env:
NEAR_WALLET_ENV: ${{ inputs.near_wallet_env }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
- run: yarn bundle --isGcsBucket=true --outDir=dist/${{ inputs.environment }}
- uses: google-github-actions/setup-gcloud@v1
- uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY_JSON }}
- run: gcloud auth activate-service-account ${{ secrets.SERVICE_ACCOUNT }} --key-file=$GOOGLE_GHA_CREDS_PATH
- run: gsutil rsync -r -d ./dist/${{ inputs.environment }} ${{ secrets.GCP_BUCKET }}