Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Configure deployment previews with Vega Editor (#9294)
## Motivation - A cloudflare-based take on #9276 - As discussed w/ @domoritz, Previewing the editor site is probably more useful than the docs site, so we're going after that first ## Changes - Use explicit packageManager version so Cloudflare doesn't autoupgrade to yarn 3 (breaks lockfile) - Add a build script (originally this was a 1-liner in package.json but it was getting hard to read) that - Builds vega-lite - Clones vega/editor and links the local vega-lite in place of the full build - Install `vega/editor` without running the `prepare` script. (The CI device doesn't have rsync installed). - Makes empty index.json for vega / vega-lite examples. - Build editor with vite with `/` as the base URL (previously it was erroring due to thinking it was under the `/editor` subdomain). Technically this is an abstraction leak but fixing it would involve modifying the vega/editor repo too and I'd like to contain this change to 1 repo if possible. ## Testing - See Cloudflare comment below, confirm site loads ## Notes - For now only `cameron.yick/*` branches have the previews since the build script is WIP. It's using my personal Cloudflare account for testing. I'll open it up to all (non dependabot/*) PRs this change is confirmed. - I've filed an request to https://blog.cloudflare.com/cloudflare-new-oss-sponsorships-program to see if we can get deployment previews sponsored (they also sponsor D3, yarn). If not, I'll plan to discuss on Slack whether to keep Cloudflare or switch the config to a different account. - Free plan limits: 500 builds/ month: https://developers.cloudflare.com/pages/platform/limits/ .
- Loading branch information