Files
gregh.dev/.github/workflows/deployment-aws.yaml
Greg Hendrickson a9db14a036 feat: Migrate to AWS CloudFront and update resume (#11)
* variables -> env

* update

* mv to vars

* update year in experience

* mv to src folder

* remove old files

* Migrate to AWS CloudFront and update resume
2025-12-20 11:49:58 -08:00

32 lines
834 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
run-name: "☁️ AWS Deploy"
name: "☁️ AWS Deploy"
on: [push]
permissions:
id-token: write
contents: read
jobs:
job-publish:
name: "📦 Publish to AWS S3/CloudFront"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
id: task_publish_checkout
uses: actions/checkout@v4
- name: "Configure AWS Credentials"
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: "Sync to S3"
run: |
aws s3 sync src/ s3://gregh.dev/ --delete --cache-control "public, max-age=3600"
- name: "Invalidate CloudFront Cache"
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"