Get Deployment ID during Pages build
Is there a way to get the Deployment ID of a Pages deployment during the build step as an environment variable?
I know the
CF_PAGES_URL
contains a part of the build ID in the subdomain, but I'm looking for a way to get the whole UUID.
Thanks in advance!5 Replies
Hmm took another look at the docs but I can't find any references to the deployment ID 😕
You could pull it from
CF_PAGES_URL
?Thanks for the reply! That's what I did earlier but the subdomain part only contains the first 8 characters of the full deployment ID.
What do you need it for?
Something similar to https://github.com/WalshyDev/cf-pages-await but instead of polling all deployments and looking for a specific commit SHA I was looking for a way to call the Get deployment info API (https://developers.cloudflare.com/api/operations/pages-deployment-get-deployment-info) directly.