juan-canham-resume/deploy/clear-cache.sh

10 lines
400 B
Bash
Raw Normal View History

2020-03-17 03:54:15 +00:00
#!/usr/bin/env bash
set -e
# shellcheck disable=SC1090
. "$( dirname "${BASH_SOURCE[0]}" )/shared-functions"
DISTRIBUTION=$(get-output site CloudfrontDistribution)
INVALIDATION=$(aws cloudfront create-invalidation --paths '/*' --distribution-id "$DISTRIBUTION" --query Invalidation.Id --output text)
aws cloudfront wait invalidation-completed --distribution-id "$DISTRIBUTION" --id "$INVALIDATION"