Merge pull request #60 from CleanSpeak/wied03/CLE-695/more_models #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cache-invalidate | |
on: | |
# Run every 10 minutes, July 8 thru July 9 | |
# This is only for the site rollout and should be removed after 2024-07-09 | |
schedule: | |
- cron: '*/10 * 8-9 7 *' | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
cache-invalidate: | |
runs-on: cleanspeak-standard | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: set aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.ACTIONS_RUNNER_ROLE_PROD }} | |
role-session-name: github-actions | |
aws-region: us-east-1 | |
- name: invalidate cache | |
run: | | |
CLOUDFRONT_DISTRIBUTION_ID=$(grep cloudfront_distribution_id s3_website.yml|awk -F: '{print $2}' |sed 's/ //g') | |
aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*" |