From 89ef1350c598f5ed3239e425f3f9e178a091c0ca Mon Sep 17 00:00:00 2001 From: juanatsap Date: Fri, 31 Oct 2025 12:41:38 +0000 Subject: [PATCH] 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" --- .github/workflows/deploy.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5091c33..32ff84a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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