Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Julen-Smith authored Sep 12, 2023
1 parent 4a8ccca commit e28c74c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/nodejs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Add SSH key to agent
- name: Process SSH Key
run: echo "${{ secrets.SERVER_SSH_KEY }}" | awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' > processed_key.pem
shell: bash

- name: Add Processed SSH Key to Agent
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ secrets.SERVER_SSH_KEY }}"
chmod 400 processed_key.pem
ssh-add processed_key.pem
- name: Diagnostic SSH into EC2
run: ssh -v ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} "echo 'SSH connection successful'"

- name: Deploy to EC2
run: |
mkdir -p ~/.ssh
Expand Down

0 comments on commit e28c74c

Please sign in to comment.