-
-
Notifications
You must be signed in to change notification settings - Fork 61
53 lines (43 loc) · 1.1 KB
/
frontend_build_push.yml
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
name: Frontend Build and upload to S3
on:
push:
branches: [ master ]
paths:
- 'frontend/**'
- '.github/workflows/frontend_build_push.yml'
pull_request:
branches: [ master ]
paths:
- 'frontend/**'
- '.github/workflows/frontend_build_push.yml'
permissions:
id-token: write
contents: read
jobs:
build_and_upload:
runs-on: ubuntu-latest
environment: Production
env:
CI: false
strategy:
matrix:
node-version: [ 16 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: cd frontend/ && npm install --legacy-peer-deps
- name: Build frontend
run: cd frontend/ && npm run build
- name: Upload to S3
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
role-session-name: fAIrGithub
- name: Install AWS CLI
run: |
ls -lh;
aws s3 cp build/ s3://${{ vars.FRONTEND_BUCKET }}/