Skip to content

Commit

Permalink
speed up Netlify preview deploys (facebook#2557)
Browse files Browse the repository at this point in the history
* attempt to seed up Netlify preview deploys

* cleanup Netlify config

* move `onlyIncludeVersions` property in docusaurus config

* use correct name for "next" version
  • Loading branch information
Simek authored Mar 25, 2021
1 parent d67da49 commit 696d8a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 4 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 696d8a5

Please sign in to comment.