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