File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 99jobs :
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
You can’t perform that action at this time.
0 commit comments