I am calling vercel API to get a deployment details from GitHub Actions workflow.
Here's my code:
- name: Get deployment details
run: |
curl -L -X GET "https://api.vercel.com/v13/deployments/${{ steps.build-and-deploy.outputs.DEPLOYMENT_URL }}?slug=***&teamId=***&withGitRepoInfo=true" \
-H "Authorization: Bearer ${{ secrets.VERCEL_TOKEN }}" -H "Content-Type: application/json"
and ${{ steps.build-and-deploy.outputs.DEPLOYMENT_URL }}
is the deployment URL which is working properly. When called this API, got INFINITE_LOOP_DETECTED
as response. What's going wrong in this code?
Links to refer: https://vercel.com/docs/rest-api/endpoints/deployments#get-a-deployment-by-id-or-url
Apologies for the confusion. The issue arose from a mistake on my part. I was including "https://" in the deployment URL within the API request. After removing "https://" and then appending the deployment URL to the API request, it worked correctly and Many thanks to @GuiFalourd grateful for your support.