fix: update user retrieval method to use findOne instead of findById #21
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: CI/CD Deploy On Virtual Machine Workflow | |
on: | |
push: | |
branches: [master] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup SSH and known hosts | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: SSH and Deploy | |
run: | | |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} "bash -l -c ' | |
export NVM_DIR=\"$HOME/.nvm\" | |
[ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\" | |
[ -s \"$NVM_DIR/bash_completion\" ] && \. \"$NVM_DIR/bash_completion\" | |
cd ~/ecommerce-api | |
git checkout master | |
git pull | |
npm install | |
npm run build | |
pm2 reload ecosystem.config.js | |
'" |