diff --git a/scripts/revalidate.sh b/scripts/revalidate.sh new file mode 100755 index 0000000..efe9807 --- /dev/null +++ b/scripts/revalidate.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail + +URL="${1:-https://kotobane.achmad.dev}" +SECRET="${REVALIDATE_SECRET:-1964edNGrm1xqE2oznfeahdheP7oAfwAob4fIxe1Gzo}" + +echo "==> Revalidating $URL ..." +curl -s -X POST "$URL/api/revalidate" \ + -H "Content-Type: application/json" \ + -d "{\"secret\":\"$SECRET\",\"type\":\"homepage\"}" | jq .