Specifying node v20 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Digital Ocean | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH Key | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.PRIVATE_KEY }} | |
- name: Deploy to Digital Ocean | |
run: | | |
ssh -o StrictHostKeyChecking=no [email protected]<< 'ENDSSH' | |
nvm use 20 | |
which node | |
which npm | |
cd /var/www/forage-abq | |
git pull origin main | |
npm install | |
npm run build | |
ENDSSH |