Skip to content

Commit

Permalink
FIX Allow different node versions for admin vs module
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jul 19, 2022
1 parent afdb0a9 commit e896563
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,22 @@ 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_VERSION=$(npm -v)
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
Expand Down

0 comments on commit e896563

Please sign in to comment.