fix ssh connection in cd pipeline #2
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 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 |