Commit 6c3b84d
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>1 parent 76e4de4 commit 6c3b84d
3 files changed
Lines changed: 17 additions & 44 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 31 | | |
47 | 32 | | |
48 | 33 | | |
49 | 34 | | |
50 | | - | |
| 35 | + | |
51 | 36 | | |
52 | 37 | | |
53 | 38 | | |
| |||
71 | 56 | | |
72 | 57 | | |
73 | 58 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
81 | 66 | | |
82 | 67 | | |
83 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
22 | | - | |
| 16 | + | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
| |||
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 40 | | |
56 | 41 | | |
57 | 42 | | |
58 | 43 | | |
59 | | - | |
| 44 | + | |
60 | 45 | | |
61 | 46 | | |
62 | 47 | | |
| |||
123 | 108 | | |
124 | 109 | | |
125 | 110 | | |
| 111 | + | |
| 112 | + | |
126 | 113 | | |
127 | 114 | | |
128 | 115 | | |
| |||
0 commit comments