diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd42438..0012a5a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }}