From 5d79b4ed5fe38d4c595589c299fd65903394abf8 Mon Sep 17 00:00:00 2001 From: Really Him Date: Wed, 22 Oct 2025 11:40:57 -0400 Subject: [PATCH] testing --- scripts/preview-theme.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/preview-theme.js b/scripts/preview-theme.js index 9cfbbe4ffc0b6..45f6ca3692de5 100644 --- a/scripts/preview-theme.js +++ b/scripts/preview-theme.js @@ -24,22 +24,25 @@ import { getGithubToken, getRepoInfo } from "./helpers.js"; // 5) VERCEL_URL (commit URL) // 6) Fallback to fork production domain const BASE_URL = (() => { + let URL = ""; if (process.env.BASE_URL) { - return process.env.BASE_URL; + URL = process.env.BASE_URL; } if (process.env.VERCEL_ENV === "production" && process.env.VERCEL_URL) { - return `https://${process.env.VERCEL_URL}`; + URL = `https://${process.env.VERCEL_URL}`; } if (process.env.VERCEL_BRANCH_URL) { - return `https://${process.env.VERCEL_BRANCH_URL}`; + URL = `https://${process.env.VERCEL_BRANCH_URL}`; } if (process.env.VERCEL_PREVIEW_URL) { - return process.env.VERCEL_PREVIEW_URL; + URL = process.env.VERCEL_PREVIEW_URL; } if (process.env.VERCEL_URL) { - return `https://${process.env.VERCEL_URL}`; + URL = `https://${process.env.VERCEL_URL}`; } - return "https://github-readme-stats-plus-theta.vercel.app"; + URL = "https://github-readme-stats-plus-theta.vercel.app"; + console.log(`Using URL: ${URL}`); + return URL; })(); const COMMENTER = "github-actions[bot]";