File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -116,20 +116,15 @@ jobs:
116116 - name : Setup SSH
117117 run : |
118118 mkdir -p ~/.ssh
119- chmod 700 ~/.ssh
120- printf "%s\n" "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
119+ echo "${{secrets.SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa
120+ echo "Host ${{ secrets.SSH_HOST }}" > ~/.ssh/config
121+ echo " User ${{ secrets.SSH_USERNAME }}" >> ~/.ssh/config
122+ echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
123+ ssh-keyscan ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
121124 chmod 600 ~/.ssh/id_rsa
122- cat <<EOF > ~/.ssh/config
123- Host remote-server
124- HostName ${{ secrets.SSH_HOST }}
125- User ${{ secrets.SSH_USERNAME }}
126- IdentityFile ~/.ssh/id_rsa
127- StrictHostKeyChecking no
128- EOF
129- #ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
130125 - name : Replace remote files
131126 run : |
132- rsync -Pavz -e "ssh -i $HOME/.ssh/id_rsa" ./output/ remote-server :/
127+ rsync -Pavz -e "ssh -i $HOME/.ssh/id_rsa" ./output/ ${{ secrets.SSH_USERNAME}}@${{secrets.SSH_HOST}} :/
133128
134129 release-core :
135130 name : Release Core
You can’t perform that action at this time.
0 commit comments