From 0714c9008ca2a4163789640bc68ab29b42390ff1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 19 Jul 2022 14:30:34 +1200 Subject: [PATCH] FIX Allow different node versions for admin vs module --- action.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index ded8feb..fc49071 100644 --- a/action.yml +++ b/action.yml @@ -180,16 +180,21 @@ runs: export NVM_DIR="$HOME/.nvm" # this loads nvm into the current terminal [[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh" - nvm install - nvm use - rm -rf client/dist - npm install -g yarn - yarn install --network-concurrency 1 if [[ -d vendor/silverstripe/admin ]]; then cd vendor/silverstripe/admin + nvm install + nvm use + npm install -g yarn yarn install --network-concurrency 1 cd ../../.. fi + nvm install + nvm use + rm -rf client/dist + if [[ $(npm -v) != $NPM_VERSION ]]; then + npm install -g yarn; + fi + yarn install --network-concurrency 1 if [[ $(cat package.json | jq -r '.scripts.build') != 'null' ]]; then echo "Running yarn build" yarn run build