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."