Test cicd #13
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 Dev | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:latest | |
options: --privileged | |
steps: | |
- name: Install OpenSSH client | |
run: | | |
apt-get update | |
apt-get install -y openssh-client | |
- name: SSH into server | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
mkdir -p ~/.ssh | |
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh -o StrictHostKeyChecking=no -p [email protected] "echo 'SSH connection established!'" |