From 6683be2012218c44e879235ccffb11939c2288ff Mon Sep 17 00:00:00 2001 From: Erland A Syafiq Date: Sat, 1 Jun 2024 23:03:59 -0400 Subject: [PATCH] Seperated out commands --- .github/workflows/vtmunc-runner.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/vtmunc-runner.yml b/.github/workflows/vtmunc-runner.yml index 34a384b..1b2c5e7 100644 --- a/.github/workflows/vtmunc-runner.yml +++ b/.github/workflows/vtmunc-runner.yml @@ -22,11 +22,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: Create SSH key - run: | - install -m 600 -D /dev/null ~/.ssh/id_rsa - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - ssh-keyscan -H vtmunc.org > ~/.ssh/known_hosts + - name: Create SSH key file + run: install -m 600 -D /dev/null ~/.ssh/id_rsa + - name: Adding contents of ssh key + run: echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + - name: Adding known hosts + run: ssh-keyscan -H vtmunc.org -i ~/.ssh/id_rsa > ~/.ssh/known_hosts - name: SSH into EC2 instance run: ssh -i ~/.ssh/id_rsa webapp@vtmunc.org - name: Pull image from docker hub