diff --git a/.github/workflows/haddocks.yaml b/.github/workflows/haddocks.yaml index 3cf77312c5..213fc977ff 100644 --- a/.github/workflows/haddocks.yaml +++ b/.github/workflows/haddocks.yaml @@ -91,11 +91,8 @@ jobs: # Erase any stale files cd "$GITHUB_WORKSPACE"/haddocks rm -rf ./* + git checkout --orphan an-empty-branch cp -r "${docs_root}"/* "$GITHUB_WORKSPACE"/haddocks - if [[ -z "$(git status --porcelain)" ]]; then - echo No changes. - else - git add . - git commit -m "Regenerated haddocks based on ${GITHUB_SHA}" - git push --force origin haddocks - fi + git add . + git commit -m "Regenerated haddocks based on ${GITHUB_SHA}" + git push --force origin haddocks