I successfully deployed a site from my web app using Netlify API, but I don’t know how to get the info that if the deployment is done or not.
I thought the response from get-deploy can be the answer, especially the summary.status of that response.
I tried to keep calling the /api/v1/sites/:site_id/deploys/:deploy_id endpoint every 5 sec and watching summary.status, however, the value of summary.status has never changed from building even after the deployment has been done.
If you cancel the build (via API or in the web UI), the state will change.
You can also check the state value returned by the API call for deploy status. Both summary.status and state will become “ready” for a successful build and deploy.
For another site boring-hoover-febc29.netlify.app has already been deployed, but the API still returns building…
Deploy id is 5f7c05ebae4c38f13eda59dc.
The current way is to keep polling the API after a time interval. If you know that your site takes 1 min on average to build, start polling the API after 1 min.