fix: fix entire repository permissions, not just .git

- Change from fixing only .git/ to fixing entire repository (.)
- Prevents "unable to unlink" errors on workflow files
- Ensures deployment user has write access to all files
- Run unconditionally as it's fast and prevents all permission issues

Fixes: "error: unable to unlink old '.github/workflows/deploy.yml': Permission denied"
This commit is contained in:
juanatsap
2025-10-31 12:41:38 +00:00
parent 7999af9107
commit 89ef1350c5
+3 -5
View File
@@ -30,11 +30,9 @@ jobs:
echo "📥 Pulling latest changes..."
cd $REPO_PATH
# Fix git permissions if needed
if [ -f .git/FETCH_HEAD ] && [ ! -w .git/FETCH_HEAD ]; then
echo "🔧 Fixing git permissions..."
sudo chown -R $USER:$USER .git
fi
# Fix repository permissions (entire repo, not just .git)
echo "🔧 Fixing repository permissions..."
sudo chown -R $USER:$USER .
git pull origin main