Skip to content

Commit 954a36c

Browse files
authored
Update deploy.yml
1 parent 9a30146 commit 954a36c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ jobs:
2727
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
2828
EOF
2929
30-
# Create directory first to ensure permissions are handled
31-
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "mkdir -p /var/www/${{ github.event.repository.name }}"
30+
# Rsync the files (excluding .git) and delete anything on the VPS that isn't in GitHub
31+
rsync -e "ssh -o StrictHostKeyChecking=no" -avz --delete --exclude '.git' . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/${{ github.event.repository.name }}
3232
33-
# Sync files excluding the heavy .git folder
34-
rsync -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" -avz --exclude '.git' . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/${{ github.event.repository.name }}
35-
36-
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
33+
# Remote build and restart
34+
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
3735
cd /var/www/${{ github.event.repository.name }}
3836
3937
nixpacks build . --name ${{ github.event.repository.name }}

0 commit comments

Comments
 (0)