Merge pull request #247 from softeerbootcamp-2nd/fe-develop #7
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: React Build | |
on: | |
push: | |
branches: | |
- fe-main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
working-directory: ./frontend | |
run: yarn install | |
- name: Build React app | |
working-directory: ./frontend | |
run: yarn build | |
- name: Deploy | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: aws s3 cp --recursive --region ${{ secrets.AWS_REGION }} ./frontend/dist s3://${{ secrets.S3_BUCKET_FRONT_NAME }}/frontend |