diff --git a/.github/scripts/deploy.sh b/.github/scripts/deploy.sh index 7febc01..4b62951 100644 --- a/.github/scripts/deploy.sh +++ b/.github/scripts/deploy.sh @@ -10,13 +10,22 @@ if ! command -v npm &> /dev/null then echo "npm could not be found, installing nvm, Node.js, and npm" curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - source ~/.bashrc + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion nvm install 20 nvm use 20 +else + # Ensure nvm is loaded + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion fi pwd +git init + git remote set-url origin https://github.com/alexindevs/roomey-api.git # Pull the latest changes from the main branch