This commit is contained in:
洛天依 2025-01-21 22:59:33 +00:00
parent 872a08242f
commit 3b0da434d8
Signed by: luo
SSH Key Fingerprint: SHA256:V1KdsvGUpiKVfrJo1oHrAPnc/Z6k/6xgaZN7iTbYBl4

View File

@ -23,10 +23,7 @@ jobs:
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
run: |
apt update && apt install -y rsync
mkdir -p "${HOME}/.ssh"
echo "${DEPLOY_SSH_KEY}" | base64 -d > "${HOME}/.ssh/id_ed25519"
chmod 600 "${HOME}/.ssh/id_ed25519"
echo "${DEPLOY_SERVER} ${DEPLOY_SERVER_KEY}" > "${HOME}/.ssh/known_hosts"
mkdir -p ~/.ssh && touch ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519
echo ${{ secrets.DEPLOY_SSH_KEY }} | base64 -d > ~/.ssh/id_ed25519
echo ${{ secrets.DEPLOY_SERVER }} ${{ env.DEPLOY_SERVER_KEY }} > ~/.ssh/known_hosts
rsync -avz --delete ./dist/ "${DEPLOY_TARGET}:~/${DEPLOY_TARGET}/"
env:
DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}