From 696d8a56ba6a01a27bf4cc60c9558fbe3b63c469 Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Thu, 25 Mar 2021 17:03:02 +0100 Subject: [PATCH] speed up Netlify preview deploys (#2557) * attempt to seed up Netlify preview deploys * cleanup Netlify config * move `onlyIncludeVersions` property in docusaurus config * use correct name for "next" version --- netlify.toml | 5 ++++- website/docusaurus.config.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 2dd3da6d40e..450489e1923 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,10 +1,13 @@ [build] base = "" publish = "website/build" - command = "export NODE_OPTIONS=--max_old_space_size=4096 && yarn && cd website && sed -i -e \"s|const baseUrl .*|const baseUrl = '/'|g\" docusaurus.config.js && yarn build" + command = "yarn && cd website && yarn build" [context.production.environment] NODE_VERSION = "14.16.0" + NODE_OPTIONS = "--max_old_space_size=4096" [context.deploy-preview.environment] NODE_VERSION = "14.16.0" + NODE_OPTIONS = "--max_old_space_size=4096" + PREVIEW_DEPLOY = "true" diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 50f0bbbe9dc..6955fae79f4 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -40,6 +40,10 @@ module.exports = { sidebarPath: require.resolve('./sidebars.json'), remarkPlugins: [require('@react-native-website/remark-snackplayer')], editCurrentVersion: true, + onlyIncludeVersions: + process.env.PREVIEW_DEPLOY === 'true' + ? ['current', '0.64', '0.63'] + : undefined, }, blog: { path: 'blog',