Fix DO deploy endpoint: /deploy -> /deployments
Static Sites on App Platform use POST /v2/apps/:id/deployments (not /deploy which is for Services and returns 405).
This commit is contained in:
@@ -67,12 +67,12 @@ jobs:
|
|||||||
|
|
||||||
echo "=== Found DO app ID: $APP_ID ==="
|
echo "=== Found DO app ID: $APP_ID ==="
|
||||||
|
|
||||||
# Trigger deployment
|
# Trigger deployment (Static Sites use /deployments, not /deploy)
|
||||||
echo "=== Triggering deployment ==="
|
echo "=== Triggering deployment ==="
|
||||||
DEPLOY_JSON=$(curl -s -w "\n%{http_code}" -X POST \
|
DEPLOY_JSON=$(curl -s -w "\n%{http_code}" -X POST \
|
||||||
-H "Authorization: Bearer $TOKEN" \
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
"https://api.digitalocean.com/v2/apps/$APP_ID/deploy")
|
"https://api.digitalocean.com/v2/apps/$APP_ID/deployments")
|
||||||
|
|
||||||
DEPLOY_HTTP=$(echo "$DEPLOY_JSON" | tail -1)
|
DEPLOY_HTTP=$(echo "$DEPLOY_JSON" | tail -1)
|
||||||
DEPLOY_BODY=$(echo "$DEPLOY_JSON" | sed '$d')
|
DEPLOY_BODY=$(echo "$DEPLOY_JSON" | sed '$d')
|
||||||
|
|||||||
Reference in New Issue
Block a user