-
Notifications
You must be signed in to change notification settings - Fork 163
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.3.3 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[build] | ||
base = "jekyll" | ||
publish = "../docs" | ||
|
||
# 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 commentThe 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. |
||
bundle exec jekyll build --config _config.yml,_config_netlify.yml \ | ||
""" | ||
|
||
# Only build if netlify.toml or jekyll files have changed | ||
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF netlify.toml jekyll" |
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:
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.