SIGN IN SIGN UP

ci: Fix docs release failing on detached HEAD (#741)

## Summary

The `doc_release_post_publish` job in `on_master.yaml` invokes
`manual_release_docs.yaml` with a commit SHA as `ref`, so
`actions/checkout` leaves the repo in a detached HEAD state. The
hand-rolled `Commit the updated package.json and lockfile` step then
runs `git push`, which fails with `fatal: You are not currently on a
branch.` (see [failing
run](https://github.com/apify/apify-client-python/actions/runs/24564853529/job/71822812783)).
The push was also invoked unconditionally even when there was nothing to
commit.

## Fix

- Replace the hand-rolled git block with `EndBug/add-and-commit@v10`
(matching `manual_version_docs.yaml`).
- Set `new_branch: ${{ github.event.repository.default_branch }}` so the
action creates/checks out a local default branch before committing. This
is required because EndBug does not handle detached HEAD by itself — its
default push is `git push origin --set-upstream` (no refspec), which
fails the same way.
- Apply the same `new_branch` fix to `manual_version_docs.yaml`, which
has the identical latent bug (introduced in #728 but not yet exercised
by a stable release).

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
V
Vlada Dusek committed
6c3b84da9f29f11bf033b08e576e9dbc96400e0a
Parent: 76e4de4
Committed by GitHub <noreply@github.com> on 4/20/2026, 10:20:41 AM