fix: ignore eslint warning (#72) #2
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: Deploy React App to S3 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ secrets.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build React app | |
run: npm run build | |
env: | |
CI: false | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Deploy to S3 | |
run: | | |
# Empty the S3 bucket | |
aws s3 rm s3://${{ secrets.S3_BUCKET }} --recursive | |
# Upload new build files | |
aws s3 sync build/ s3://${{ secrets.S3_BUCKET }} --delete |