Skip to content

Commit

Permalink
Add build and push GH workflow for Frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
eternaltyro committed Apr 17, 2024
1 parent bc2033d commit e4fb94f
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/frontend_build_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Frontend Build and upload to S3

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
id-token: write
contents: read

jobs:
Build_On_Ubuntu:

runs-on: ubuntu-latest
env:
CI: false

strategy:
matrix:
node-version: [ 16 ]


steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: |
cd frontend/
npm install --legacy-peer-deps
- name: Build
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: |
aws s3 cp build/* s3://${{ env.FRONTEND_BUCKET }}/

0 comments on commit e4fb94f

Please sign in to comment.