Skip to content

Commit

Permalink
�ci: change file
Browse files Browse the repository at this point in the history
  • Loading branch information
GitJIHO authored Nov 16, 2024
1 parent fc0bc63 commit 2dd0537
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ jobs:
- name: 📝 Add SSH Host Key
run: |
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
cat ~/.ssh/known_hosts
- name: 📂 Create Directory on Server
run: |
ssh -o StrictHostKeyChecking=no jiho99322@${{ secrets.SERVER_IP }} "mkdir -p /var/www/html/dist"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null jiho99322@${{ secrets.SERVER_IP }} "mkdir -p /var/www/html/dist"
- name: 📤 Copy Files to Server
run: |
ssh -o StrictHostKeyChecking=no jiho99322@${{ secrets.SERVER_IP }} "scp -r dist/* jiho99322@${{ secrets.SERVER_IP }}:/tmp/"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null jiho99322@${{ secrets.SERVER_IP }} "scp -r dist/* jiho99322@${{ secrets.SERVER_IP }}:/tmp/"
- name: ⚙️ Move Files to Target Directory and Set Permissions
run: |
ssh -o StrictHostKeyChecking=no jiho99322@${{ secrets.SERVER_IP }} "sudo mv /tmp/* /var/www/html/dist/ && sudo chmod -R 755 /var/www/html/dist"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null jiho99322@${{ secrets.SERVER_IP }} "sudo mv /tmp/* /var/www/html/dist/ && sudo chmod -R 755 /var/www/html/dist"
- name: 🔄 Restart Nginx on Server
run: |
ssh -o StrictHostKeyChecking=no jiho99322@${{ secrets.SERVER_IP }} "sudo systemctl restart nginx"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null jiho99322@${{ secrets.SERVER_IP }} "sudo systemctl restart nginx"

0 comments on commit 2dd0537

Please sign in to comment.