From f003f8f2eb92d9ffa8de79b75da22ccdbb8dcce9 Mon Sep 17 00:00:00 2001 From: Ali Q <22217494+AliQassab@users.noreply.github.com> Date: Wed, 28 Feb 2024 07:36:46 +0000 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b89c8d9..69f26f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,28 +26,28 @@ jobs: USERNAME: ${{ secrets.USERNAME }} PASSWORD: ${{ secrets.PASSWORD }} script: | - # Logging start of script execution - echo "Starting script execution..." - - # Navigate to the directory - if [ -d "bahja-isaac-nas-discord-chatbot" ]; then - cd bahja-isaac-nas-discord-chatbot || exit 1 - else - echo "Error: Directory 'bahja-isaac-nas-discord-chatbot' not found." - exit 1 - fi - - # Pull latest changes from Git - git pull - - # Install npm dependencies - npm install - - # Stop chatbot if running - pm2 stop chatbot - - # Start chatbot - pm2 start index.js --name chatbot - - # Logging completion of script execution - echo "Script execution completed successfully." + # Logging start of script execution + echo "Starting script execution..." + + # Navigate to the directory + if [ -d "bahja-isaac-nas-discord-chatbot" ]; then + cd bahja-isaac-nas-discord-chatbot || exit 1 + else + echo "Error: Directory 'bahja-isaac-nas-discord-chatbot' not found." + exit 1 + fi + + # Pull latest changes from Git + git pull + + # Install npm dependencies + npm install + + # Stop chatbot if running + pm2 stop chatbot + + # Start chatbot + pm2 start index.js --name chatbot + + # Logging completion of script execution + echo "Script execution completed successfully."