From 23d2d31a271f768e1102ecf4ee758d5ae7c914db Mon Sep 17 00:00:00 2001 From: achmad Date: Fri, 29 May 2026 01:53:35 +0700 Subject: [PATCH] chore: add revalidation script --- scripts/revalidate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/revalidate.sh 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 .