ci: fix deploy-onixbyte — install rsync, pass key via env
Deploy / build (push) Failing after 33s
Deploy / deploy-vercel (push) Has been skipped
Deploy / deploy-onixbyte (push) Has been skipped

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.
This commit is contained in:
2026-06-23 10:54:16 +08:00
parent 3efbd77892
commit 34785e2abe
+4 -1
View File
@@ -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 }}