Skip to content

Merge pull request #300 from helium/feat/cloudflare-prod #6

Merge pull request #300 from helium/feat/cloudflare-prod

Merge pull request #300 from helium/feat/cloudflare-prod #6

name: Invalidate CloudFront Distribution
on:
push:
branches:
- main
paths:
- 'manifests/web-cluster/prod/helium/metadata.yaml'
jobs:
cloudfront-invalidation:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Invalidate CloudFront distribution
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_WEB_PROD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_WEB_PROD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Create CloudFront Invalidation
run: |
DISTRIBUTION_ID=${{ secrets.AWS_WEB_PROD_CLOUDFRONT_DISTRIBUTION_ID }}
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"