Files
hls.js/scripts/build-cloudflare.sh
Tom Jenkinson 489e9419ce Switch from netlify to CloudFlare Pages (#5305)
* add a script that will deploy the `netlify` dir to cloudflare pages

* switch everything from netlify over to cf pages

* fix wrangler version

* add `/` to api-docs url

* fix name of cloudflare dev project
2023-03-17 16:07:30 +00:00

20 lines
434 B
Bash
Executable File

#!/bin/bash
set -e
root="./cloudflare-pages"
rm -rf "$root"
mkdir "$root"
echo "Building for CloudFlare..."
# redirect / to /demo
echo "/ /demo" > "$root/_redirects"
echo "/api-docs/ /api-docs/hls.js.hls.html" >> "$root/_redirects"
echo "/api-docs/index.html /api-docs/hls.js.hls.html" >> "$root/_redirects"
cp -r "./dist" "$root/dist"
cp -r "./demo" "$root/demo"
cp -r "./api-docs" "$root/api-docs"
echo "Built for CloudFlare."