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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user