-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from fac30/yml-update
attempt to fix .yml file with aq update
- Loading branch information
Showing
1 changed file
with
32 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,37 @@ | ||
name: remote ssh command | ||
name: Execute Remote SSH Commands | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
branches: [main] | ||
|
||
build: | ||
name: Build | ||
jobs: | ||
execute-commands: | ||
name: Execute Commands | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/[email protected] | ||
with: | ||
HOST: ${{ secrets.HOST }} | ||
USERNAME: ${{ secrets.USERNAME }} | ||
PASSWORD: ${{ secrets.PASSWORD }} | ||
script: | | ||
cd bahja-isaac-nas-discord-chatbot | ||
git pull | ||
npm i | ||
pm2 stop chatbot | ||
pm2 start index.js --name chatbot | ||
|
||
name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
|
||
name: Execute SSH Commands | ||
uses: appleboy/[email protected] | ||
with: | ||
HOST: ${{ secrets.HOST }} | ||
USERNAME: ${{ secrets.USERNAME }} | ||
PASSWORD: ${{ secrets.PASSWORD }} | ||
script: | | ||
echo "Starting script execution..." | ||
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 | ||
git pull | ||
npm install | ||
pm2 stop chatbot | ||
pm2 start index.js --name chatbot | ||
echo "Script execution completed successfully." |