From fe082c3efdc816318b6a10148efe8f4a9576f81c Mon Sep 17 00:00:00 2001 From: Pablo Pettinari Date: Mon, 15 Dec 2025 16:12:08 +0100 Subject: [PATCH] fix: remove published check from Netlify deploy script --- src/scripts/get-netlify-branch-deploy.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/scripts/get-netlify-branch-deploy.ts b/src/scripts/get-netlify-branch-deploy.ts index 8533e2c4bd6..f49fbca8a1f 100644 --- a/src/scripts/get-netlify-branch-deploy.ts +++ b/src/scripts/get-netlify-branch-deploy.ts @@ -1,4 +1,4 @@ -// Fetches the latest published Netlify deploy for the current branch and outputs its URL for GitHub Actions +// Fetches the latest ready Netlify deploy for the current branch and outputs its URL for GitHub Actions import fs from "fs" const siteId = process.env.NETLIFY_SITE_ID @@ -13,7 +13,6 @@ if (!siteId || !branch || !token) { type NetlifyDeploy = { state: string branch: string - published: boolean deploy_ssl_url?: string deploy_url?: string } @@ -31,12 +30,10 @@ type NetlifyDeploy = { process.exit(1) } const deploys: NetlifyDeploy[] = await res.json() - // Find the latest published deploy for this branch - const latest = deploys.find( - (d) => d.state === "ready" && d.branch === branch && d.published - ) + // Find the latest ready deploy for this branch + const latest = deploys.find((d) => d.state === "ready" && d.branch === branch) if (!latest) { - console.error("No published deploy found for branch:", branch) + console.error("No ready deploy found for branch:", branch) process.exit(1) } // Use GitHub Actions recommended output syntax (GITHUB_OUTPUT)