Skip to content

Auto Email response added #25

Auto Email response added

Auto Email response added #25

name: Deploy Frontend
on:
push:
branches:
- main
paths:
- 'static/index.html'
- 'static/styles.css'
- 'static/scripts.js'
- 'favicon.ico'
- '.github/workflows/frontend-deploy.yml'
jobs:
deploy:
name: Deploy to S3 and Invalidate CloudFront
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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: Deploy static files to S3
run: |
aws s3 sync ./static/ s3://${{ secrets.S3_BUCKET_NAME }} \
--exclude ".git/*" \
--exclude ".github/*" \
--exclude "backend/*" \
--exclude "README.md" \
--delete
- name: Invalidate CloudFront distribution
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \
--paths "/*"