From 9f35190f39275fd1bfafd42f23fe66c8e69d5895 Mon Sep 17 00:00:00 2001 From: Youn-Rha <86452280+Youn-Rha@users.noreply.github.com> Date: Sat, 16 Nov 2024 08:51:02 +0900 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4523e9f..ccd0ead 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,11 +39,8 @@ jobs: run: sudo apt-get install -y sshpass # sshpass 설치 - name: Deploy to Server - env: - SSH_PASSWORD: ${{ secrets.PASSWORD }} - SERVER_IP: ${{ secrets.HOST }} run: | - sshpass -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@$HOST "mkdir -p /var/www/html/dist" - sshpass -p "$PASSWORD" scp -o StrictHostKeyChecking=no -P 16122 -r dist/* rayoen@$HOST:/var/www/html/dist/ - sshpass -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@$HOST "chmod -R 755 /var/www/html/dist" - sshpass -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@$HOST "sudo systemctl restart nginx" + sshpass -p "${{ secrets.PASSWORD }}" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@${{ secrets.HOST }} "mkdir -p /var/www/html/dist" + sshpass -p "${{ secrets.PASSWORD }}" scp -o StrictHostKeyChecking=no -P 16122 -r dist/* rayoen@${{ secrets.HOST }}:/var/www/html/dist/ + sshpass -p "${{ secrets.PASSWORD }}" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@${{ secrets.HOST }} "chmod -R 755 /var/www/html/dist" + sshpass -p "${{ secrets.PASSWORD }}" ssh -o StrictHostKeyChecking=no -p 16122 rayoen@${{ secrets.HOST }} "sudo systemctl restart nginx"