update deploy file with nvm #27
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 App | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: SSH Exec | |
uses: appleboy/ssh-action@v1.0.0 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
port: ${{ secrets.PORT }} | |
key: ${{ secrets.KEY }} | |
script: | | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/git_id_rsa | |
cd ${{ secrets.PATH}} | |
git pull | |
/usr/bin/fish | |
nvm use 20 | |
${{ secrets.NODE }}/npm install | |
${{ secrets.NODE }}/npm run build | |
${{ secrets.NODE }}/pm2 restart thelonelylands --silent |