[Web Prod] Build and Deploy #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[Web Prod] Build and Deploy" | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- web-prod | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set VERSION | |
id: version | |
run: | | |
echo "VERSION=$(cat version.json | jq -r .version)" >> "$GITHUB_OUTPUT" | |
- name: Build | |
working-directory: web | |
run: | | |
make build ENV=prod REACT_APP_ISDOCKEREXT=false | |
- name: Deploy | |
working-directory: web | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: eu-west-2 | |
run: | | |
aws s3 rm s3://app-gosh-sh --recursive | |
aws s3 sync build/ s3://app-gosh-sh | |
aws cloudfront create-invalidation --distribution-id E2N1XW3TTILT0O --paths '/*' |