File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Frontend
2
+
3
+ on :
4
+ push :
5
+ branches : [ 'main' ]
6
+
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ id-token : write # This is required for requesting the JWT
11
+ contents : read # This is required for actions/checkout
12
+
13
+ env :
14
+ AWS_REGION : ap-southeast-1
15
+ S3_BUCKET_NAME : app.peerprep.org
16
+
17
+ jobs :
18
+ deploy :
19
+ name : Deploy Frontend
20
+ runs-on : ubuntu-latest
21
+ environment : production
22
+
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+
26
+ - name : Configure AWS credentials
27
+ id : aws-configure
28
+ uses :
aws-actions/[email protected]
29
+ with :
30
+ role-to-assume : arn:aws:iam::491085383176:role/github_s3_copy
31
+ role-session-name : GitHub_to_AWS_via_FederatedOIDC
32
+ aws-region : ${{ env.AWS_REGION }}
33
+
34
+ - name : Build frontend distribution
35
+ working-directory : frontend
36
+ run : npm ci && npm run build
37
+
38
+ - name : Sync distribution to S3
39
+ run : |
40
+ aws s3 sync ./frontend/dist/frontend/browser/ s3://$S3_BUCKET_NAME --delete
You can’t perform that action at this time.
0 commit comments