Merge pull request #11 from CaliberVB/feature/update-content #14
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: Upload Static Website to AWS S3 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- 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: ap-southeast-1 | |
- name: Deploy static site to S3 bucket | |
run: aws s3 sync ./ s3://caliber.build-website --delete | |
# Invalidate Cloudfront | |
- name: Cloudfront Invalidation | |
uses: chetan/invalidate-cloudfront-action@master | |
env: | |
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_PRODUCTION }} | |
PATHS: '/*' | |
AWS_REGION: 'ap-southeast-1' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |