Skip to content

feat: added know hosts #2

feat: added know hosts

feat: added know hosts #2

Workflow file for this run

name: Save changes on server (test)
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add server to known_hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Server connection
run: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "cd /home/projects && git clone git@github.com:alemndev/kazemaru.git"