test workflow, again #3
This file contains hidden or 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: deploying the backend to vm | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ssh into vm and deploy the docker image for backend | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.VM_HOST }} | |
| username: ubuntu | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| whoami | |
| source ~/.bashrc | |
| cd ~/paytm-Backend | |
| git pull origin main | |
| echo "pull complete" | |
| npm install | |
| npm run build | |
| pm2 restart "finno_be" | |