ci: configure Netlify so deploy previews actually build - #209
Merged
Conversation
Netlify is connected to this repo for pull request preview URLs but has never produced a successful deploy; react-xarrows.netlify.app returns 404. There was no netlify.toml, so it fell back to auto-detection, which cannot work here. The site lives in examples/, but it resolves the library from ../src through a Vite alias, so it has to be built from the repo root rather than with a base directory of examples/. Meanwhile the root build script builds the library into lib/, which is not a website. Pins the build command, the publish directory and Node 22. GITHUB_PAGES is deliberately left unset: examples/vite.config.ts reads it to choose between the /react-xarrows/ base GitHub Pages needs and the root base Netlify serves from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for react-xarrows ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds Netlify configuration for deploy previews. Netlify builds the examples package from the repository root, publishes ChangesNetlify deployment
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Netlify is connected for preview URLs but has never produced a successful deploy.
react-xarrows.netlify.appcurrently returns 404, and the checks on #208 are allDeploy failed.Why it fails
There is no
netlify.toml, so Netlify falls back to auto-detection, and auto-detection cannot work on this repo:examples/, not the repo rootexamples/either, because it resolves the library from../srcthrough a Vite alias, so a base directory ofexamples/would not see itbuildscript builds the library intolib/, which is not a websiteFix
Pins the build command, publish directory and Node version.
GITHUB_PAGESis deliberately left unset.examples/vite.config.tsreads it to choose between the/react-xarrows/base GitHub Pages needs and the root base Netlify serves from, so setting it here would break every asset URL. Verified locally that with it unset the emittedindex.htmlreferences/assets/..., which is what Netlify wants.This PR tests itself
Netlify reads
netlify.tomlfrom the pull request branch, so the deploy preview check on this PR is the verification. If it goes green, previews work.🤖 Generated with Claude Code
Summary by CodeRabbit