Update main.yml #45
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 | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.11.1' | |
- name: SSH Remote Commands | |
uses: appleboy/[email protected] | |
with: | |
USERNAME: ${{ secrets.USERNAME }} | |
HOST: ${{ secrets.HOST }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
script: | | |
cd bahja-isaac-nas-discord-chatbot | |
git pull | |
npm i | |
pm2 stop index.js | |
pm2 start index.js --name chatbot |