File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,19 @@ jobs:
49
49
exit 1
50
50
fi
51
51
52
- # Configuration de SSH
52
+ # Configuration of SSH
53
53
mkdir -p ~/.ssh
54
54
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | tee ~/.ssh/id_rsa > /dev/null
55
55
chmod 600 ~/.ssh/id_rsa
56
56
ssh-keyscan -H "$SERVER_IP" >> ~/.ssh/known_hosts
57
57
58
- # Test de connexion SSH
58
+ # Test SSH
59
59
ssh -o StrictHostKeyChecking=no "$SERVER_USER@$SERVER_IP" "echo 'SSH connection successful'"
60
-
61
- # Déploiement avec rsync
62
- rsync -avz --no-perms --no-times --delete dist/ "$SERVER_USER@$SERVER_IP:$SERVER_PATH"
63
-
64
- # Changer les permissions directement sur le serveur
65
- ssh "$SERVER_USER@$SERVER_IP" "sudo chown -R www-data:www-data /var/www/pcoundia.com"
60
+
61
+ rsync -avz --chown=www-data:www-data --chmod=755 --delete dist/ "$SERVER_USER@$SERVER_IP:$SERVER_PATH"
62
+
63
+ ssh "$SERVER_USER@$SERVER_IP" << 'EOF'
64
+ sudo find /var/www/pcoundia.com/ -type d -exec chmod 755 {} \;
65
+ sudo find /var/www/pcoundia.com/ -type f -exec chmod 644 {} \;
66
+ sudo chown -R www-data:www-data /var/www/pcoundia.com/
67
+ EOF
You can’t perform that action at this time.
0 commit comments