Update deploy.yml #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Action | |
on: [ push ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: system deps | |
run: | | |
sudo apt install --upgrade -y openssh-client openssh-known-hosts openssh-server | |
- name: ssh setup | |
run: | | |
mkdir -p ~/.ssh/ | |
chmod 700 ~/.ssh/ | |
eval "$(ssh-agent -s)" | |
echo "${{ secrets.SSH_PRIVKEY }}" | tr -d '\r' > ~/.ssh/id_rsa | |
echo "${{ secrets.SSH_PUBKEY }}" | tr -d '\r' > ~/.ssh/id_rsa.pub | |
chmod 644 ~/.ssh/id_rsa | |
chmod 644 ~/.ssh/id_rsa.pub | |
ssh-add -vvv | |
ls ~/.ssh/ | |
ssh-keyscan -H "${{ secrets.SSH_IP }}" >> ~/.ssh/known_hosts | |
- name: test file creation | |
run: | | |
ssh -vT "bauer@${{ secrets.SSH_IP }}" "echo hola>hola" | |