diff --git a/.github/workflows/cdn-deploy-main.yml b/.github/workflows/cdn-deploy-main.yml index 53caae0..c652df7 100644 --- a/.github/workflows/cdn-deploy-main.yml +++ b/.github/workflows/cdn-deploy-main.yml @@ -1,27 +1,23 @@ name: Build & deploy CDN assets +run-name: Deploy CDN assets to the `main` bucket for `${GITHUB_SHA}` on: push: branches: - main - jobs: deploy: name: Build & deploy CDN assets 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 CDN assets to S3 + CloudFront run: | aws s3 sync --delete --cache-control max-age=691200 dist/. s3://${{ secrets.AZ_DIGITAL_CDN_BUCKET }}/lib/az-icons/main/ aws cloudfront create-invalidation --distribution-id ${{ secrets.AZ_DIGITAL_CDN }} --paths /lib/az-icons/main/* -