Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr3c10us authored Oct 9, 2023
1 parent 91f22fd commit 73f19f2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,29 @@ jobs:
key: ${{ secrets.SSH_KEY }}
passphrase: ""
port: 22
script: whoami
script: |
if [ -d /home/ubuntu/Wheelsdrive-CSMS ]; then
cd /home/ubuntu/Wheelsdrive-CSMS && git pull
else
git clone https://github.com/Pr3c10us/Wheelsdrive-CSMS.git /home/ubuntu/Wheelsdrive-CSMS
fi
cd /home/ubuntu/Wheelsdrive-CSMS/Backend/Api && sudo npm install && if sudo npm stop; then
# If command1 succeeds
echo "Command 1 succeeded"
# Run another command
sudo npm start
else
# If command1 fails
echo "Command 1 failed"
# Run a different command
sudo npm start
cd /home/ubuntu/Wheelsdrive-CSMS/Backend/WebSocket && sudo npm install && if sudo npm stop; then
# If command1 succeeds
echo "Command 1 succeeded"
# Run another command
sudo npm start
else
# If command1 fails
echo "Command 1 failed"
# Run a different command
sudo npm start

0 comments on commit 73f19f2

Please sign in to comment.