Files
gregh.dev/.github/workflows/deployment-aws.yaml
2026-02-03 19:11:53 +00:00

35 lines
878 B
YAML
Raw Permalink 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:
branches: [main]
workflow_dispatch:
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 "/*"