Repository navigation
75 lines (61 loc) · 2.26 KB
/
Copy pathci.yml
File metadata and controls
75 lines (61 loc) · 2.26 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build
on: [push]
jobs:
test:
strategy:
matrix:
node: ["24.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
id-token: write
steps:
- name: Wiz sensor
uses: Web3Auth/.github/.github/actions/wiz-sensor@545f7c255313f85d38a02dc36c4ad01387d03149 # v1.0.0
with:
enabled: ${{ vars.WIZ_SENSOR_ENABLED }}
token: ${{ secrets.WIZ_SENSOR_TOKEN }}
- name: Check out Git repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
cache: "npm"
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Pack and build example
if: github.ref == 'refs/heads/master'
run: |
cd examples/vue-example
npm install
npm run build
# Set the credentials from repository settings/secrets
- name: Configure AWS credentials
if: github.ref == 'refs/heads/master'
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION_US }}
# Upload to S3. The sync action cannot use OIDC session credentials.
- name: sync s3
if: github.ref == 'refs/heads/master'
run: aws s3 sync ./examples/vue-example/dist s3://demo-auth.web3auth.io --no-progress --region us-east-1
# Invalidate Cloudfront (this action)
- name: Update AWS Cloudfront Config
uses: chaitanyapotti/cloudfront-update-distribution@b120c0220453e292a43e5563f008f8e9e52858d6 # v5
if: github.ref == 'refs/heads/master'
with:
cloudfront-distribution-id: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
cloudfront-invalidation-required: true
cloudfront-invalidation-path: "/*"
cloudfront-wait-for-service-update: false