Skip to content

Commit 685e9ee

Browse files
Merge pull request #593 from torusresearch/feat/update-example-demo-app
Feat/update example demo app
2 parents 83d2f27 + 7ec3712 commit 685e9ee

18 files changed

Lines changed: 6652 additions & 1102 deletions

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,42 @@ jobs:
2828
run: npm run build
2929
env:
3030
WEB3AUTH_CLIENT_ID: ${{ secrets.WEB3AUTH_CLIENT_ID }}
31+
32+
- name: Pack and build example
33+
if: github.ref == 'refs/heads/master'
34+
run: |
35+
npm pack
36+
cd examples/demo-app
37+
npm install --legacy-peer-deps
38+
npm run build
39+
40+
# Set the credentials from repository settings/secrets
41+
- name: Configure AWS credentials
42+
if: github.ref == 'refs/heads/master'
43+
uses: aws-actions/configure-aws-credentials@v2
44+
with:
45+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
46+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
47+
aws-region: ${{ secrets.AWS_REGION_US }}
48+
49+
# Copy the files from build folder to the S3 bucket
50+
# Upload to S3
51+
- name: sync s3
52+
if: github.ref == 'refs/heads/master'
53+
uses: jakejarvis/s3-sync-action@master
54+
env:
55+
SOURCE_DIR: "./examples/demo-app/dist"
56+
AWS_REGION: "us-east-1"
57+
AWS_S3_BUCKET: "demo-eth.tor.us"
58+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
59+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
60+
61+
# Invalidate Cloudfront (this action)
62+
- name: invalidate
63+
if: github.ref == 'refs/heads/master'
64+
uses: chaitanyapotti/cloudfront-update-distribution@v2
65+
with:
66+
cloudfront-distribution-id: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
67+
cloudfront-invalidation-required: true
68+
cloudfront-invalidation-path: "/*"
69+
cloudfront-wait-for-service-update: false

examples/demo-app/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<link rel="preconnect" href="https://session.web3auth.io" />
99
<link rel="dns-prefetch" href="https://session.web3auth.io" />
10-
<title>Vite + Vue</title>
10+
<link rel="preconnect" href="https://fonts.googleapis.com" />
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
12+
<title>Torus embed Demo</title>
1113
</head>
1214
<body>
1315
<div id="app"></div>

0 commit comments

Comments
 (0)