12# Builds the docs site for `forge site deploy docs` the way3# .github/workflows/site.yml does: the /node section renders from lofi-node at4# the ref that workflow pins, cloned from the forge this repo came from.5set -eu6ref=$(sed -n 's/^ LOFI_NODE_REF: *//p' .github/workflows/site.yml)7[ -n "$ref" ] || { echo "no LOFI_NODE_REF in .github/workflows/site.yml" >&2; exit 1; }8LOFI_NODE_DIR=lofi-node-checkout LOFI_NODE_REF=$ref9export LOFI_NODE_DIR LOFI_NODE_REF10rm -rf "$LOFI_NODE_DIR"11git clone -q "$(git remote get-url origin | sed 's|lofi\(\.git\)\{0,1\}$|lofi-node.git|')" "$LOFI_NODE_DIR"12git -C "$LOFI_NODE_DIR" checkout -q --detach "$ref"13# llms.txt names absolute URLs; point them at where this build is served.14if [ -n "${FORGE_SITE_URL:-}" ]; then SITE_URL=${FORGE_SITE_URL%/}; export SITE_URL; fi15deno task site:gen16npm ci --prefix website17npm run build --prefix website