Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Youn-Rha authored Nov 15, 2024
1 parent 4482143 commit 9f35190
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 9f35190

Please sign in to comment.