Finger Rock image #10
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 site to S3 | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
update-site: | |
name: Update public site | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- name: Deploy newly built site to S3 + CloudFront | |
run: | | |
aws s3 sync --delete public/ s3://${{ secrets.LTRR_SITE_BUCKET }}/ | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.LTRR_SITE_CDN }} --paths '/*' | |