From 1d79d952bccb656585de78d766291f1ac8c265bd Mon Sep 17 00:00:00 2001 From: SunYerim Date: Thu, 13 Jun 2024 16:04:25 +0900 Subject: [PATCH] Update cicd.yml --- .github/workflows/cicd.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 51a6019..e65d1e3 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -40,8 +40,15 @@ jobs: docker build -t ${{ secrets.DOCKER_USERNAME }}/sunjoo:sentimentAnalysis . docker push ${{ secrets.DOCKER_USERNAME }}/sunjoo:sentimentAnalysis + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts + - name: SSH and Deploy - uses: appleboy/ssh-action@master + uses: appleboy/ssh-action@v0.1.5 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }}