Skip to content

Commit c38bb36

Browse files
authored
Merge pull request #38 from Omarmhmdd/hotfix/fix-CD
hotfix:fixed CD in workflow
2 parents a6eda5a + d2e2471 commit c38bb36

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ jobs:
144144
uses: actions/checkout@v4
145145

146146
- name: Setup SSH
147-
shell: bash
148-
run: |
149-
mkdir -p "${HOME}/.ssh"
150-
echo "${{ secrets.AWS_SSH_PRIVATE_KEY }}" > "${HOME}/.ssh/id_rsa"
151-
chmod 600 "${HOME}/.ssh/id_rsa"
152-
ssh-keyscan -H ${{ secrets.AWS_HOST }} >> "${HOME}/.ssh/known_hosts"
147+
uses: webfactory/ssh-agent@v0.9.0
148+
with:
149+
ssh-private-key: ${{ secrets.AWS_SSH_PRIVATE_KEY }}
150+
151+
- name: Add SSH known hosts
152+
run: ssh-keyscan -H ${{ secrets.AWS_HOST }} >> ~/.ssh/known_hosts
153153

154154
- name: Deploy Backend
155155
env:

0 commit comments

Comments
 (0)