Skip to content

updated website

updated website #4

name: Deploy Website
on:
push:
branches: [main]
paths:
- "website/**"
- ".github/workflows/deploy-website.yml"
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_REGION: us-east-1
AWS_S3_BUCKET: capabilitykit.com
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
steps:
- 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: ${{ env.AWS_REGION }}
- name: Deploy to S3
run: aws s3 sync website/ "s3://${AWS_S3_BUCKET}" --delete
- name: Invalidate CloudFront cache
if: env.CLOUDFRONT_DISTRIBUTION_ID != ''
run: aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_DISTRIBUTION_ID}" --paths "/*"