diff --git a/.netlify/build-deploy-preview.sh b/.netlify/build-deploy-preview.sh index 5b8e2a31b..20562afc4 100644 --- a/.netlify/build-deploy-preview.sh +++ b/.netlify/build-deploy-preview.sh @@ -7,7 +7,6 @@ cd "$(dirname "$0")" # Helpful to verify which versions we're using yarn -v node -v -yarn config set workspaces-experimental true # Install GitBook CLI echo 'Installing Gitbook CLI' @@ -25,8 +24,8 @@ for D in *; do # Clear previous output, generate new rm -rf _book - gitbook install - gitbook build + npx gitbook install + npx gitbook build cd .. @@ -61,7 +60,7 @@ mkdir ./docs/latest/_book/demo/ # Install build deps and all monorepo package dependencies. Yarn Workspaces # should also symlink all projects appropriately -yarn install --no-ignore-optional --pure-lockfile +# yarn install --no-ignore-optional --pure-lockfile # Navigate to our Viewer project cd ./platform/viewer/ @@ -69,13 +68,13 @@ cd ./platform/viewer/ # Create a Versions File node -p -e \"'export default \\'' + require('./package.json').version + '\\';'\" > src/version.js # Copy over wado-image-loader codecs and worker file -npx cpx \"node_modules/cornerstone-wado-image-loader/dist/*.min.js*\" \"public\" -v +cp \"node_modules/cornerstone-wado-image-loader/dist/*.min.js*\" \"public\" -v # Build using react-scripts # npx cross-env PUBLIC_URL=/demo REACT_APP_CONFIG=config/netlify.js react-scripts --max_old_space_size=4096 build # Build using WebPack # TODO: consume public/config correctly instead of hardcode npx cross-env NODE_ENV=production webpack-dev-server --config config/webpack.prod.js --mode production -w -d # Copy output to the folder that is our publish target -npx cpx 'dist/**/*' ./../../docs/latest/_book/demo --verbose +cp 'dist/**/*' ./../../docs/latest/_book/demo --verbose echo 'Nothing left to see here. Go home, folks.' diff --git a/netlify.toml b/netlify.toml index 4ba777999..4d1ee73e5 100644 --- a/netlify.toml +++ b/netlify.toml @@ -18,9 +18,9 @@ [build.environment] NODE_VERSION = "10.16.0" YARN_VERSION = "1.17.3" + RUBY_VERSION = "2.6.2" YARN_FLAGS = "--no-ignore-optional --pure-lockfile" - # Production context: all deploys from the Production branch set in your site's # deploy contexts will inherit these settings. # [context.production] @@ -33,7 +33,7 @@ [context.deploy-preview] base = "" publish = "docs/latest/_book/" - command = "chmod +x .netlify/build-deploy-preview.sh && .netlify/build-deploy-preview.sh" + command = "yarn config set workspaces-experimental true && chmod +x .netlify/build-deploy-preview.sh && .netlify/build-deploy-preview.sh" # Redirects and headers are GLOBAL for all builds – they do not get scoped to # contexts no matter where you define them in the file.