Skip to content

fix ssh connection in cd pipeline #2

fix ssh connection in cd pipeline

fix ssh connection in cd pipeline #2

Workflow file for this run

name: Deploy to Droplet
on:
push:
branches:
- dev # Change this to main if you are using main as your default branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SSH client
run: sudo apt-get install openssh-client -y
- name: Add SSH key
uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to Droplet
run: |
ssh -vvv -o "UseDNS=no" -o ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}
- name: Test we are connect to the server
run: mkdir generate_with_github_actions