Skip to content

Commit

Permalink
ci: drop local gh-pages commit if bench result is not pushed to gh-pages
Browse files Browse the repository at this point in the history
If benchmark result is not pushed to gh-pages, on a consecutive
benchmark step, there will be a non-fast-forward git fetch error

Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Nov 25, 2024
1 parent f424431 commit 7fcb4bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/actions/bench/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,10 @@ runs:
comment-on-alert: true
summary-always: true
alert-threshold: ${{ inputs.alert_threshold }}
- name: Reset gh-pages if result is not pushed to gh-pages
shell: ${{ env.SHELL }}
if: ${{ inputs.store_results != 'true' }}
run: |
git -c advice.detachedHead=false switch gh-pages
git reset --hard HEAD~1
git checkout -

0 comments on commit 7fcb4bd

Please sign in to comment.