Skip to content

Commit c3ff55d

Browse files
committed
fix: ci/cd
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
1 parent 08f6d4c commit c3ff55d

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/ci-cd.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,16 @@ jobs:
4949
- name: Push Docker image
5050
run: docker push sahilyeole/portfolio:latest
5151

52-
- name: Start ssh-agent
53-
uses: webfactory/ssh-agent@v0.5.4
54-
with:
55-
ssh-private-key: ${{ secrets.SSH_KEY }}
56-
ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
57-
5852
- name: Deploy to server via SSH
59-
run: |
60-
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'EOF'
53+
uses: appleboy/ssh-action@master
54+
with:
55+
host: ${{ secrets.SSH_HOST }}
56+
username: ${{ secrets.SSH_USERNAME }}
57+
key: ${{ secrets.SSH_KEY }}
58+
passphrase: ${{ secrets.SSH_PASSPHRASE }}
59+
script: |
6160
docker pull sahilyeole/portfolio:latest
6261
docker stop portfolio-container || true
6362
docker rm portfolio-container || true
6463
docker run -d --name portfolio-container -p 80:3000 sahilyeole/portfolio:latest
65-
EOF
6664

0 commit comments

Comments
 (0)