Deploy test site / deploy (push) Successful in 51s
User, 19 Oct 2026: build a new version of the order tool like mobineko.com/order; it should also offer selectable mastering like brandenburgmastering.com at 60 USD a track. - New docs/order.html (site /demos/order/): 15-step rail, step panel, large live SVG record (colour per disc, translucent, split, splatter, marble, colour-in-colour; label, dead wax, jacket view), floating quote card with price, ship window and quantity; phone strip and bottom bar. Review lists what is missing, itemised quote with basis badges, deposit, lead time, ERPNext touchpoints on the simulated order. Disabled-not-hidden options with reasons. - Mastering choice: none, in-house vinyl mastering (5,000 THB a side, default), or partner studio (Brandenburg Mastering, Amsterdam, example, not contracted) at 60 USD a track (team figure), replacing the in-house line. - Same R list and quote() as artist-order: defaults reproduce 37,836 THB per title and the per-copy figures; new lines (repress stamper, colour effects, printed inner, finish, obi, bag, shipping) are estimates. - artist-platform.md: the page and the mastering choice; README, landing page and site/build.sh entries. - Checks: pw_order.py 96 checks (parity, partner mastering, 15 steps at 1440/1024/768/390 dark and light, disabled force-clicks, render sizes and fills, uploads, audio readers, share link, place order).
64 lines
2.2 KiB
Bash
64 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Assemble the cnxvinyl.lol web root in site/dist.
|
|
#
|
|
# site/public/ copied verbatim: landing page, robots.txt, and any static
|
|
# site dropped in as its own directory (site/public/<name>/)
|
|
# DEMOS below pages copied out of docs/, so docs/ stays their one source
|
|
#
|
|
# Run locally with `bash site/build.sh`, then open site/dist/index.html.
|
|
# CI (.gitea/workflows/deploy-site.yml) runs the same script and deploys
|
|
# site/dist as it is.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
out=site/dist
|
|
rm -rf "$out"
|
|
mkdir -p "$out"
|
|
cp -R site/public/. "$out/"
|
|
|
|
# "<source in the repo> <path under the web root>"
|
|
DEMOS=(
|
|
"docs/plant-operation.html demos/plant-operation/index.html"
|
|
"docs/fleet-calculator.html demos/fleet-calculator/index.html"
|
|
"docs/steam-cooling.html demos/steam-cooling/index.html"
|
|
"docs/order.html demos/order/index.html"
|
|
"docs/artist-order.html demos/artist-order/index.html"
|
|
"docs/make-a-record.html demos/make-a-record/index.html"
|
|
"docs/factory-console.html demos/factory/index.html"
|
|
)
|
|
for entry in "${DEMOS[@]}"; do
|
|
read -r src dst <<<"$entry"
|
|
mkdir -p "$out/$(dirname "$dst")"
|
|
cp "$src" "$out/$dst"
|
|
done
|
|
|
|
# The deploy job reads this back from the server to confirm what is live.
|
|
git rev-parse HEAD >"$out/version.txt" 2>/dev/null || echo unknown >"$out/version.txt"
|
|
|
|
# Fail on a dead internal link: every href/src in every page that points
|
|
# inside the site must resolve to a file in dist.
|
|
dead=0
|
|
while IFS= read -r page; do
|
|
dir=$(dirname "$page")
|
|
while IFS= read -r ref; do
|
|
# shellcheck disable=SC2016 # literal ${ and {{ mark JS/template strings
|
|
case "$ref" in
|
|
'' | '#'* | http:* | https:* | mailto:* | tel:* | data:* | javascript:* | *'${'* | *'{{'*) continue ;;
|
|
esac
|
|
ref=${ref%%#*}
|
|
ref=${ref%%\?*}
|
|
case "$ref" in
|
|
/*) target="$out$ref" ;;
|
|
*) target="$dir/$ref" ;;
|
|
esac
|
|
[ -d "$target" ] && target="${target%/}/index.html"
|
|
if [ ! -f "$target" ]; then
|
|
echo "dead link in ${page#"$out"/}: $ref" >&2
|
|
dead=1
|
|
fi
|
|
done < <(grep -o -E '(href|src)="[^"]*"' "$page" | sed -E 's/^(href|src)="//; s/"$//')
|
|
done < <(find "$out" -name '*.html')
|
|
[ "$dead" -eq 0 ] || exit 1
|
|
|
|
echo "built $out: $(find "$out" -type f | wc -l | tr -d ' ') files"
|