Merge pull request #19 from svc-design/codex/fix-id_rsa-file-not-found-error

Fix SSH directory creation in deploy workflow
This commit is contained in:
shenlan 2025-06-19 13:30:52 +08:00 committed by GitHub
commit d33cb2f537

View File

@ -48,9 +48,9 @@ jobs:
RSYNC_SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VPS_HOST: ${{ secrets.VPS_HOST }}
run: |
mkdir -p ~/.ssh
echo "$RSYNC_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
mkdir -p ~/.ssh
ssh-keyscan -H "$VPS_HOST" >> ~/.ssh/known_hosts
rsync -av out/ root@"$VPS_HOST":/mnt/data/website/ --delete