Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions scripts/build_shmuggingface_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
requires a separate flag so a local run never clobbers the live
site by accident.
--cf-env PATH
Cloudflare env file to source before wrangler.
Default: ``~/.config/adanim/cloudflare_api_token.env``.
Cloudflare env file to source before wrangler. Must target Shay's
*personal* Cloudflare account (``shaypal5@gmail.com``) — LeadForge is
an open-source project, not an Adanim one.
Default: ``~/.config/pagent/personal/cloudflare/cloudflare_api_token.env``.
Comment on lines 37 to +41
--project-name NAME
Cloudflare Pages project name.
Default: ``leadforge-lead-scoring-v1-preview``.
Expand Down Expand Up @@ -70,7 +72,9 @@
GITHUB_BLOB_RELEASE = f"{GITHUB_BLOB_BASE}/release"
# Pinned via package.json → package-lock.json; `npm install` resolves it.
SMF_CORE_NPM = Path(__file__).parent.parent / "node_modules/@shmuggingface/core"
DEFAULT_CF_ENV = Path.home() / ".config/adanim/cloudflare_api_token.env"
# LeadForge is Shay's open-source project — deploy from the personal
# Cloudflare account (shaypal5@gmail.com), never the Adanim account.
DEFAULT_CF_ENV = Path.home() / ".config/pagent/personal/cloudflare/cloudflare_api_token.env"
DEFAULT_PROJECT = "leadforge-lead-scoring-v1-preview"

TIER_LABEL = {"intro": "Intro", "intermediate": "Intermediate", "advanced": "Advanced"}
Expand Down Expand Up @@ -528,9 +532,15 @@ def deploy_site(
if result.returncode != 0:
sys.exit(f"Deployment failed (wrangler exit code {result.returncode})")

suffix = "" if production else "/preview"
# Do not synthesise the hostname from the project name: on the
# personal account the ``…pages.dev`` subdomain is Cloudflare-assigned
# and suffixed (e.g. ``leadforge-lead-scoring-v1-preview-een.pages.dev``)
# because the unsuffixed name is globally taken by the retired
# Adanim-account project. Wrangler prints the real immutable +
# stable URLs above; point the operator at those.
print(
f"\n Live at: https://{project_name}.pages.dev{suffix}",
"\n Deployment complete — see the immutable and stable URLs "
"printed by wrangler above.",
file=sys.stderr,
)

Expand Down
Loading