Skip to content

load NVM from ~/.bash_profile #11

load NVM from ~/.bash_profile

load NVM from ~/.bash_profile #11

Workflow file for this run

name: Update and rebuild on the server
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.HOST_SSH_KEY }}
- name: Deploy to webserver
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USERNAME }}@${{ secrets.HOST_IP }} "
source ~/.bash_profile
cd /home/website/crmn.to
git fetch && git reset --hard origin/master
nvm install 20
nvm use 20
npm install
npm run build
pm2 delete crmn.to
pm2 start ecosystem.config.cjs
"