From 69654d1054d1ff71be7d414e2669b313e502ec2f Mon Sep 17 00:00:00 2001 From: Chengming-Li <115936688+Chengming-Li@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:39:33 -0700 Subject: [PATCH] Update cd-branch.yml --- .github/workflows/cd-branch.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd-branch.yml b/.github/workflows/cd-branch.yml index 875a3ccf8..c7bad7937 100644 --- a/.github/workflows/cd-branch.yml +++ b/.github/workflows/cd-branch.yml @@ -10,7 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - - name: Install sshpass - run: sudo apt-get install -y sshpass - - name: SSH into server - run: sshpass -p ${{ secrets.SSH_PASSWORD }} ssh root@hozer-51.ocf.berkeley.edu 'echo hello' + - name: executing remote ssh commands using ssh key + uses: appleboy/ssh-action@v1.0.3 + with: + host: hozer-51.ocf.berkeley.edu + username: root + key: ${{ secrets.SSH_KEY }} + port: 22 + script: whoami