mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-24 09:33:44 +03:00
24 lines
593 B
Bash
24 lines
593 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e # exit on error
|
||
|
|
||
|
echo jsdelivr clearing cache
|
||
|
curl -i -X POST https://purge.jsdelivr.net/ \
|
||
|
-H 'cache-control: no-cache' \
|
||
|
-H 'content-type: application/json' \
|
||
|
-d '{
|
||
|
"path": [
|
||
|
"npm/redoc@latest/bundles/redoc.browser.lib.js",
|
||
|
"npm/redoc@latest/bundles/redoc.lib.js",
|
||
|
"npm/redoc@latest/bundles/redoc.standalone.js"
|
||
|
]
|
||
|
}'
|
||
|
|
||
|
echo
|
||
|
echo start invalidate cloudfront
|
||
|
|
||
|
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION --paths "/redoc/*"
|
||
|
|
||
|
echo Cache cleared successfully
|
||
|
|
||
|
exit 0
|