Merge pull request #36 from fac30/read-me-2 #16
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: Execute Remote SSH Commands | |
on: | |
push: | |
branches: [main] | |
jobs: | |
execute-commands: | |
name: Execute Commands | |
runs-on: ubuntu-latest | |
steps: | |
- name: Execute SSH Commands | |
uses: appleboy/[email protected] | |
with: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
script: | | |
cd bahja-isaac-nas-discord-chatbot/bahja-isaac-nas-discord-chatbot | |
git pull | |
npm install | |
pm2 stop chatbot | |
# Start chatbot | |
pm2 start index.js --name chatbot | |
# Logging completion of script execution | |
echo "Script execution completed successfully." |