Skip to content

Commit 54f7710

Browse files
author
Fr4gm3nt3d_sh
committed
Update .github/workflows/llmcodereview.yml
1 parent 8ea94a4 commit 54f7710

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/llmcodereview.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
gemini-report:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214

1315
steps:
1416
- name: Checkout repo
@@ -115,8 +117,12 @@ jobs:
115117
git add report*.html report.html
116118
git commit -m "Add Gemini code report" || echo "No changes to commit"
117119
118-
# Push using the PAT
119-
git remote add pages https://x-access-token:${GH_PAGES_PAT}@github.com/Mod-Sauce/mod-sauce.github.io.git
120-
git fetch pages main || git checkout --orphan main
121-
git reset pages/main || true
122-
git push pages HEAD:main --force
120+
# Add remote and fetch the target repo
121+
git remote add pages "https://x-access-token:${GH_PAGES_PAT}@github.com/Mod-Sauce/mod-sauce.github.io.git"
122+
git fetch pages main
123+
124+
# Merge the fetched main into current branch (or create if it doesn't exist)
125+
git merge --allow-unrelated-histories pages/main -m "Merge reports" || true
126+
127+
# Push to the target repo
128+
git push pages HEAD:main

0 commit comments

Comments
 (0)