From 34785e2abeb0abc201720fa2343f41c1a48ad53a Mon Sep 17 00:00:00 2001 From: siujamo Date: Tue, 23 Jun 2026 10:54:16 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20deploy-onixbyte=20=E2=80=94=20insta?= =?UTF-8?q?ll=20rsync,=20pass=20key=20via=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apt-get install rsync since the runner image lacks it. Pass DEPLOY_SSH_KEY through an env var so the secret value is not printed in the script block. --- .gitea/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 7c68898..ef8964d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -57,9 +57,12 @@ jobs: path: doc_build/ - name: Deploy to OnixByte.cn + env: + DEPLOY_KEY: ${{ secrets.DEPLOY_SSH_KEY }} run: | + apt-get update -qq && apt-get install -y -qq rsync mkdir -p ~/.ssh - echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 + printf '%s' "$DEPLOY_KEY" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 ssh-keyscan onixbyte.cn >> ~/.ssh/known_hosts rsync -avz --delete doc_build/ root@onixbyte.cn:${{ vars.DEPLOY_PATH }}