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
DeChill
DeChill•7mo ago
Hmm took another look at the docs but I can't find any references to the deployment ID 😕
Hello, I’m Allie!
You could pull it from CF_PAGES_URL?
DeChill
DeChill•7mo ago
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.
Hello, I’m Allie!
What do you need it for?
DeChill
DeChill•7mo ago
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.
Want results from more Discord servers?
Add your server