-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathpassport-sdk-sample-app-deployment.yaml
More file actions
49 lines (40 loc) · 1.81 KB
/
passport-sdk-sample-app-deployment.yaml
File metadata and controls
49 lines (40 loc) · 1.81 KB
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
42
43
44
45
46
47
48
49
name: Passport SDK Sample App Deployment
on:
push:
paths:
- "packages/passport/**"
branches:
- main
workflow_dispatch:
# this is used by github OIDC to assume the admin role later on
permissions: # see this: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_REGION: us-east-2
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.TS_IMMUTABLE_SDK_NX_TOKEN }}
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # pin@v4.1.0
with:
role-to-assume: ${{ secrets.AWS_IMMUTABLE_PROD_ADMIN_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.1
with:
fetch-depth: 0
- name: setup
uses: ./.github/actions/setup
- name: Initialize and install current @latest sdk versions on npm
run: pnpm --filter @imtbl/sdk... exec sh -c "jq --arg version \"$(npm view @imtbl/metrics versions --json | jq -r '.[-1]')\" '.version = \$version' package.json > package.tmp.json && mv package.tmp.json package.json" && pnpm i
- name: Build Static Passport sample app
run: pnpm nx run @imtbl/passport-sdk-sample-app:build --skip-nx-cache
- name: Upload to S3
run: |
aws s3 sync ./packages/passport/sdk-sample-app/out s3://imx-passport-frontend-prod/sdk-sample-app
- name: Clear the cloudfront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_PASSPORT_PROD_DISTRIBUTION_ID }} --paths "/*"