Skip to content

Commit

Permalink
Update ci_cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danyama committed Sep 11, 2024
1 parent d923a74 commit 299d864
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Connect to USP Server Machine
run: |
ssh ubuntu@200.144.244.245 -p 2222
${{ secrets.SSH_PASSCODE }}
cd /diskb/home/backend
- name: Run remote command via SSH
uses: D3rHase/ssh-command-action@latest
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
private_key: ${{ secrets.SSH_PASSCODE }}
command: echo 'Hello, World!'

- name: Notify Command Success
run: echo "Command executed on ${{ secrets.HOST }} successfully!"
# - name: Connect to USP Server Machine
# run: |
# ssh ubuntu@200.144.244.245 -p 2222
# ${{ secrets.SSH_PASSCODE }}
# cd /diskb/home/backend
# source venv/bin/activate
# git pull
# alembic upgrade heads
Expand Down

0 comments on commit 299d864

Please sign in to comment.