From 0dc7e2272663a4503687848d57977811b1d4e97b Mon Sep 17 00:00:00 2001 From: fzorb Date: Sat, 30 Nov 2024 23:00:44 +0200 Subject: [PATCH] use password based auth which doesn't really matter since this is a private thing --- .gitea/workflows/action.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index f2344f1..a5e9d87 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -12,7 +12,7 @@ jobs: - name: init env run: | sudo apt-get update - sudo apt-get install -y rsync openssh-client hugo git + sudo apt-get install -y rsync openssh-client hugo git sshpass - name: init git run: | @@ -31,15 +31,12 @@ jobs: - name: init ssh run: | - mkdir -p ~/.ssh - echo "${{ secrets.PRIVKEY2 }}" | base64 -d > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa ssh-keyscan -p 22 10.14.0.205 >> ~/.ssh/known_hosts - name: upload new files run: | - rsync -avzh website/public/ -e "ssh -i ~/.ssh/id_rsa -p 22" --omit-dir-times git@10.14.0.205:/var/www/fzorb.xyz + rsync -avzh website/public/ -e "sshpass -p ${{secrets.PASSWD}}" --omit-dir-times git@10.14.0.205:/var/www/fzorb.xyz - name: fix perms run: | - ssh -i ~/.ssh/id_rsa -p 22 git@10.14.0.205 "chmod 755 -R /var/www/fzorb.xyz" + sshpass -p ${{secrets.PASSWD}} git@10.14.0.205 "chmod 755 -R /var/www/fzorb.xyz"