Github Action what deploying CRA app at AWS S3 and CloudFront
It is not limited to CRA app, just customize some command
- Customize trigger
on: # trigger when push to master
push:
branches:
- master
- Add Option
jobs:
deploy:
runs-on: ubuntu-18.04 #or -latest
env:
AWS_S3_BUCKET_NAME: your-s3-bucket-name
AWS_CF_DISTRIBUTION_ID: your-cloudfront-distribution_id
AWS_REGION: your-s3-region-name
# and you need github secrets for
# ASW_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
- Add Secrets at your repo
${{ secrets.AWS_ACCESS_KEY_ID }}
${{ secrets.AWS_SECRET_ACCESS_KEY }}