Skip to content

fix: unnecessary localization (#56) #7

fix: unnecessary localization (#56)

fix: unnecessary localization (#56) #7

Workflow file for this run

name: Deploy Frontend to S3
on:
workflow_dispatch:
inputs:
ref:
description: "Git ref to deploy (commit SHA or tag)"
required: true
type: string
push:
tags:
- "v*.*.*"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy-frontend:
name: Deploy Frontend
runs-on: ubuntu-latest
environment: production
env:
S3_BUCKET: people-manager-bucket-1
CLOUDFRONT_DISTRIBUTION_ID: EKQSELA6RXUSP
REACT_APP_BACKEND_URL: https://people-manager.mindsharkportal.com
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn workspace frontend build
env:
NODE_ENV: production
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Upload to S3
run: aws s3 sync packages/frontend/build/ s3://$S3_BUCKET --delete
- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --paths "/*" --distribution-id $CLOUDFRONT_DISTRIBUTION_ID