-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Netlify to build documentation preview for PRs #2646
base: main
Are you sure you want to change the base?
Conversation
0d77eb0
to
cd7fdb9
Compare
✅ Deploy Preview for ruby-lsp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
2b5284b
to
aa76659
Compare
Because Netlify uses rvm, Ruby 3.3.4+ currently fails to build on its containers due to: - ruby/bigdecimal#297 - rubygems/rubygems#8015 And because Netlify doesn't allow installing apt packages, we can't address the issue to make the install succeed. So instead, we need to use a version of Ruby that can be built on Netlify's containers.
0787ec5
to
e8da83d
Compare
@@ -1 +0,0 @@ | |||
../.ruby-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to stay 3.3.3 for now because Netlify uses rvm, which Ruby 3.3.4+ currently fails to build on its
containers due to:
- bigdecimal install error ruby/bigdecimal#297
- gem installation failure with clang and gcc rubygems/rubygems#8015
And because Netlify doesn't allow installing apt packages, we can't address the issue to make the install succeed. So instead, we need to use a version of Ruby that can be built on Netlify's containers.
|
||
# Set the baseurl to "/" and url to "$DEPLOY_PRIME_URL" so that the built site is served from the root | ||
command = """ | ||
printf "url: \"$DEPLOY_PRIME_URL\"\nbaseurl: \"/\"" > _config_netlify.yml; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we want to build new sites for PR preview, the url will vary PR by PR. So this line is needed to dynamically generate suitable Jekyll configs for Netlify.
And because it needs to be dynamic, it can't be a committed _config_netlify.yml
file.
Motivation
Currently, to review a documentation change, one needs to:
gh
commandcd jekyll
bundle exec jekyll serve
And it's assuming that Jekyll is already installed to the latest version locally.
If we can have a way to preview the doc changes directly, it'd be much easier for maintainers and anyone who's interested in the changes to review. And hopefully lowering the reviewing costs can also make doc contribution (feel) easier.
Implementation
jekyll
folder. I explained more in the comments below.netlify.toml
to store all build configurations.With the build ignore config in place, Netlify's free plan should cover our current usages.
Automated Tests
Manual Tests