← back to Dw Batch
migrate GoDaddy auth → Bearer PAT (TK-10 key rotation); sso-key fallback retained
fc5cf59795830034a4668821be3b6611c11574e1 · 2026-07-27 20:04:04 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit fc5cf59795830034a4668821be3b6611c11574e1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 27 20:04:04 2026 -0700
migrate GoDaddy auth → Bearer PAT (TK-10 key rotation); sso-key fallback retained
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
deploy-domain.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/deploy-domain.sh b/deploy-domain.sh
index 2e06f17..9dd5f43 100755
--- a/deploy-domain.sh
+++ b/deploy-domain.sh
@@ -54,14 +54,16 @@ nginx -t 2>&1 && systemctl reload nginx 2>&1 | tail -1"
echo "[$DOMAIN] === Phase C: GoDaddy A + CNAME ==="
GD_KEY=$(grep -E "^GODADDY_API_KEY=" ~/Projects/secrets-manager/.env | cut -d= -f2)
GD_SECRET=$(grep -E "^GODADDY_API_SECRET=" ~/Projects/secrets-manager/.env | cut -d= -f2)
+GD_PAT="${GODADDY_PAT:-$(grep -E "^GODADDY_PAT=" ~/Projects/secrets-manager/.env | cut -d= -f2)}"
+if [ -n "$GD_PAT" ]; then GD_AUTH="Bearer $GD_PAT"; else GD_AUTH="sso-key ${GD_KEY}:${GD_SECRET}"; fi
curl -s -X PUT \
- -H "Authorization: sso-key ${GD_KEY}:${GD_SECRET}" \
+ -H "Authorization: $GD_AUTH" \
-H "Content-Type: application/json" \
"https://api.godaddy.com/v1/domains/$DOMAIN/records/A/@" \
-d "[{\"data\":\"45.61.58.125\",\"ttl\":600,\"name\":\"@\",\"type\":\"A\"}]" \
-w "[$DOMAIN] A→ HTTP %{http_code}\n" -o /dev/null
curl -s -X PUT \
- -H "Authorization: sso-key ${GD_KEY}:${GD_SECRET}" \
+ -H "Authorization: $GD_AUTH" \
-H "Content-Type: application/json" \
"https://api.godaddy.com/v1/domains/$DOMAIN/records/CNAME/www" \
-d "[{\"data\":\"$DOMAIN\",\"ttl\":600,\"name\":\"www\",\"type\":\"CNAME\"}]" \
← 81ec3cf template-v2: square product-card images (aspect-ratio 1/1)
·
back to Dw Batch
·
(newest)