Skip to content

Commit

Permalink
Update cd-branch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Chengming-Li authored Apr 5, 2024
1 parent 79e92c1 commit f8e9ba5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/cd-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
options: --privileged

steps:
- name: Install SSH client
- name: SSH into server
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
run: |
apt-get update
apt-get install -y openssh-client
- name: Run SSH command
run: |
ssh -i ${{ secrets.SSH_KEY }} [email protected] "echo test"
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -o StrictHostKeyChecking=no -p [email protected] "echo 'SSH connection established!'"

0 comments on commit f8e9ba5

Please sign in to comment.