File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -146,17 +146,18 @@ jobs:
146146 alert-threshold : ' 150%'
147147 fail-on-alert : false
148148
149- - name : Copy latest results for baseline
149+ - name : Commit baseline to gh-pages
150150 run : |
151- mkdir -p docs/benchmark
152- cp benchmark-results.json docs/benchmark/latest.json
153-
154- - name : Commit baseline
155- uses : stefanzweifel/git-auto-commit-action@v5
156- with :
157- commit_message : " Update benchmark baseline"
158- file_pattern : docs/benchmark/latest.json
159- branch : gh-pages
151+ git fetch origin gh-pages --depth=1 2>/dev/null || true
152+ git worktree add /tmp/gh-pages gh-pages 2>/dev/null || git worktree add /tmp/gh-pages -b gh-pages
153+ mkdir -p /tmp/gh-pages/docs/benchmark
154+ cp benchmark-results.json /tmp/gh-pages/docs/benchmark/latest.json
155+ cd /tmp/gh-pages
156+ git add docs/benchmark/latest.json
157+ git diff --cached --quiet || git commit -m "Update benchmark baseline"
158+ git push origin gh-pages || true
159+ cd -
160+ git worktree remove /tmp/gh-pages
160161
161162 - name : Upload benchmark artifact
162163 uses : actions/upload-artifact@v5
You can’t perform that action at this time.
0 commit comments