File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- pull_request :
7
+
8
+ env :
9
+ AWS_REGION : us-east-1
8
10
9
11
jobs :
10
12
build :
19
21
node-version : ' 20'
20
22
cache : ' yarn'
21
23
- name : Install dependencies
22
- run : yarn --prefer-offline
24
+ run : yarn --prefer-offline --frozen-lockfile
23
25
- name : Check the types
24
26
run : yarn type-check
25
27
- name : Lint
28
30
run : yarn build
29
31
- name : Test
30
32
run : yarn test
31
- # call steps to run a deploy at dev|staging environment
33
+
34
+ deploy :
35
+ name : Deploy
36
+ needs : build
37
+ runs-on : ubuntu-latest
38
+ steps :
39
+ - name : Checkout
40
+ uses : actions/checkout@v3
41
+ - name : Setup Node.js
42
+ uses : actions/setup-node@v3
43
+ with :
44
+ node-version : ' 20'
45
+ cache : ' yarn'
46
+ - name : Install dependencies
47
+ run : yarn --prefer-offline --frozen-lockfile
48
+ - name : Build
49
+ run : yarn build
50
+ - name : Configure AWS credentials
51
+ uses : aws-actions/configure-aws-credentials@v4
52
+ with :
53
+ aws-region : ${{ env.AWS_REGION }}
54
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY }}
55
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_KEY }}
56
+ role-to-assume : ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
57
+ mask-aws-account-id : true
58
+ - name : Use AWS CLI
59
+ run : aws s3 ls
You can’t perform that action at this time.
0 commit comments