Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AliQassab authored Feb 28, 2024
1 parent c962eb6 commit 1e63d13
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,22 @@ on:
branches: [main]

jobs:
execute-commands:
name: Execute Commands
deploy:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
# with:
# path: bahja-isaac-nas-discord-chatbot



- name: Debugging - List Contents of Current Directory
run: ls -la


- name: Debugging - Print Working Directory
run: pwd


- name: Execute SSH Commands
uses: appleboy/[email protected]
- name: SSH Remote Commands
uses: appleboy/[email protected]
with:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
script: |
cd /home/runner/work/bahja-isaac-nas-discord-chatbot/bahja-isaac-nas-discord-chatbot || exit 1
# Pull latest changes from Git
git pull

# Install npm dependencies
npm install

# Stop chatbot if running
pm2 stop index.js

# Start chatbot
pm2 start index.js --name chatbot
git pull
npm install
pm2 stop index.js
pm2 start index.js --name chatbot

0 comments on commit 1e63d13

Please sign in to comment.