Skip to content

Commit cb1ab09

Browse files
build: disable Git hooks and delete tracking branch before push in markdown equations
PR-URL: #13542 Reviewed-by: Athan Reines <kgryte@gmail.com> Closes: #13394
1 parent 7d78500 commit cb1ab09

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎.github/workflows/markdown_equations.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ jobs:
9696
git config --local user.name "stdlib-bot"
9797
timeout-minutes: 5
9898

99+
# Disable Git hooks:
100+
- name: 'Disable Git hooks'
101+
run: |
102+
rm -rf .git/hooks
103+
99104
# Import GPG key to sign commits:
100105
- name: 'Import GPG key to sign commits'
101106
# Pin action to full length commit SHA
@@ -177,6 +182,9 @@ jobs:
177182
# Fetch the branch first so that --force-with-lease in the subsequent push has a local tracking reference and can verify the remote state:
178183
git fetch origin markdown-insert-equations 2>/dev/null || true
179184
gh api -X DELETE repos/stdlib-js/stdlib/git/refs/heads/markdown-insert-equations 2>/dev/null || true
185+
186+
# Delete the local tracking branch so that --force-with-lease does not reject the push due to stale info:
187+
git branch -dr origin/markdown-insert-equations 2>/dev/null || true
180188
timeout-minutes: 5
181189

182190
# Create a pull request with the updated equations:

0 commit comments

Comments
 (0)