From 917a1df2a445e04e3bea405801010c46651ea8ae Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 29 Sep 2019 10:52:20 +0800 Subject: [PATCH] chore: executing remote ssh commands using ssh key --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39ccc2a..a214dc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,7 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: executing remote ssh commands + - name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST }} @@ -15,3 +14,12 @@ jobs: password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} script: whoami + + - name: executing remote ssh commands using ssh key + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: whoami