diff --git a/.github/workflows/build-pre.yml b/.github/workflows/build-pre.yml index 8e20581..a68d3ed 100644 --- a/.github/workflows/build-pre.yml +++ b/.github/workflows/build-pre.yml @@ -150,4 +150,15 @@ jobs: gh release delete "$TAGNAME" --yes gh release create "$TAGNAME" --target "main" --title "$NAME" --notes "$NOTES" --prerelease artifacts/* env: - GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} + + - name: Setup SSH Key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts + + - name: Upload Release to Server + run: | + scp -r artifacts/* ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/home/user/files/AUTO_MAA/