Skip to content

try to debug ssh connection #12 #14

try to debug ssh connection #12

try to debug ssh connection #12 #14

name: Deploy to remote server
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up docker compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Configure SSH agent and add private key
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
- name: Create docker context
run: docker context create remoteContext --docker host=ssh://smirnovlad@158.160.113.82 --docker "ssh-arg=-A"
- name: Deploy with docker compose
run: docker-compose --context remoteContext up --build