Merge pull request #128 from dragoni7/clear-all-fragments #166
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: s3-depl | |
on: | |
push: | |
branches: | |
- master | |
env: | |
VITE_API_KEY: ${{ secrets.VITE_API_KEY }} | |
VITE_CLIENT_ID: ${{ secrets.VITE_CLIENT_ID }} | |
VITE_CLIENT_SECRET: ${{ secrets.VITE_CLIENT_SECRET }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: 'us-east-1' | |
- name: Build React App | |
run: npm install && npm run build | |
- name: Deploy | |
uses: lbertenasco/s3-deploy@v1 | |
with: | |
folder: dist | |
bucket: ${{ secrets.AWS_S3_BUCKET }} | |
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} | |
invalidation: / * | |