File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff 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 }}
You can’t perform that action at this time.
0 commit comments