#!/usr/bin/env bash # Cloudflare Pages build: copies the deployable site into dist/ (everything except tools/, # functions/, src/, migrations/, test/, downloads/, package files, README and dotfiles), then runs # IndexNow against the built sitemap. functions/ stays at the repository root, where Pages finds it # and bundles it with src/. Native installer artifacts are not part of this build. set -euo pipefail python3 tools/build-site.py --community-pages rm -rf dist && mkdir dist for f in * ; do case "$f" in dist|tools|functions|src|migrations|test|downloads|node_modules|package.json|package-lock.json|wrangler.toml|README.md|LICENSE) continue ;; esac cp -R "$f" dist/ done cp _headers _redirects _routes.json dist/ node tools/indexnow.mjs dist/sitemap.xml dist --lastmod