From 5f65e20265cd2d6e9ee182aa0e4905f18df4740a Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 May 2026 18:06:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=B8=BASSH=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E8=AE=A4=E8=AF=81=E6=96=B9=E5=BC=8F=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 4ea80a9..1d63b67 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -77,24 +77,15 @@ jobs: steps: - name: Install SSH client run: | - if ! command -v ssh &> /dev/null; then - if command -v apk &> /dev/null; then - apk add --no-cache openssh-client - elif command -v apt-get &> /dev/null; then - apt-get update && apt-get install -y openssh-client - fi + if command -v apk &> /dev/null; then + apk add --no-cache openssh-client sshpass + elif command -v apt-get &> /dev/null; then + apt-get update && apt-get install -y openssh-client sshpass fi - - name: Setup SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true - - name: Deploy to server run: | - ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << 'EOF' + sshpass -p '${{ secrets.DEPLOY_PASSWORD }}' ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << 'EOF' cd ${{ secrets.DEPLOY_PATH }} docker compose pull docker compose down