Skip to content

Commit 8b7d4e3

Browse files
committed
fix: improve git authentication by separating remote setup and push with token
1 parent 76a9b5f commit 8b7d4e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,17 @@ jobs:
235235
cd ./site-build
236236
echo "📁 Current directory: $(pwd)"
237237
echo "📊 Files to deploy: $(find . -type f | wc -l)"
238-
238+
239239
git init
240240
git add .
241241
git commit -m "Deploy to GitHub Pages"
242242
git branch -M gh-pages
243-
243+
244244
echo "🔗 Adding remote origin..."
245-
git remote add origin https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
246-
245+
git remote add origin https://github.com/${{ github.repository }}.git
246+
247247
echo "📤 Pushing to gh-pages branch..."
248-
git push -f origin gh-pages
248+
git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git gh-pages
249249
250250
echo "✅ Deployment completed"
251251

0 commit comments

Comments
 (0)