Add token whitespace trimming and debug line
This commit is contained in:
@@ -19,6 +19,12 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
BASE_URL="${{ inputs.BASE_URL }}"
|
||||
DEPLOY_TOKEN="${{ inputs.DEPLOY_TOKEN }}"
|
||||
|
||||
# Strip any whitespace/newlines
|
||||
DEPLOY_TOKEN="${DEPLOY_TOKEN//[$'\t\r\n ']}"
|
||||
|
||||
echo "Token length: ${#DEPLOY_TOKEN}"
|
||||
|
||||
# Strip trailing slashes
|
||||
BASE_URL="${BASE_URL%/}"
|
||||
@@ -27,6 +33,8 @@ runs:
|
||||
if [[ "$BASE_URL" != http://* && "$BASE_URL" != https://* ]]; then
|
||||
BASE_URL="https://${BASE_URL}"
|
||||
fi
|
||||
|
||||
echo "Using url ${BASE_URL}/api/v1/deploy?site=${{ inputs.SITE_ID }}"
|
||||
|
||||
RESPONSE=$(curl -sS -X POST \
|
||||
"${BASE_URL}/api/v1/deploy?site=${{ inputs.SITE_ID }}" \
|
||||
|
||||
Reference in New Issue
Block a user