Skip to content

Commit da3c89f

Browse files
authored
ci: build release docs from the branch tip, not the dispatch ref (#1946)
In the stable release, the `doc_release` job checked out the workflow-dispatch ref (the pre-bump commit), so the docs were redeployed from stale content. After the v1.7.2 release the changelog page stayed at `1.7.2 — not yet released` instead of the finalized dated entry, and the new version snapshot wasn't published. The fix points the docs build at the up-to-date branch tip (`github.ref_name`) via a new optional `ref` input on `manual_release_docs.yaml`. By the time `doc_release` runs, the branch tip already carries the finalized changelog and the version snapshot pushed earlier in the run. Other entry points (on-master docs deploys, manual dispatches) are unaffected because `ref` defaults to the triggering ref. The same approach is being applied to `apify-sdk-python` and `apify-client-python`, where the docs build additionally runs a theme-update step — checking out the branch tip (rather than threading a detached commit SHA) keeps that step's internal `git checkout master` working. Note: this fix applies to the next release; the currently-deployed v1.7.2 docs still need a one-off manual `Release docs` run to refresh.
1 parent ec09604 commit da3c89f

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎.github/workflows/manual_release_docs.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ name: Release docs
33
on:
44
# Runs when manually triggered from the GitHub UI.
55
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: Commit SHA or ref to build the docs from. If empty, the triggering ref is used.
9+
required: false
10+
type: string
11+
default: ""
612

713
# Runs when invoked by another workflow.
814
workflow_call:
15+
inputs:
16+
ref:
17+
description: Commit SHA or ref to build the docs from. If empty, the triggering ref is used.
18+
required: false
19+
type: string
20+
default: ""
921

1022
permissions:
1123
contents: read
@@ -39,6 +51,7 @@ jobs:
3951
- name: Checkout repository
4052
uses: actions/checkout@v6
4153
with:
54+
ref: ${{ inputs.ref }}
4255
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
4356

4457
- name: Set up Node

‎.github/workflows/manual_release_stable.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,10 @@ jobs:
155155
id-token: write
156156
checks: read
157157
uses: ./.github/workflows/manual_release_docs.yaml
158+
with:
159+
# Build from the up-to-date branch tip, not the workflow-dispatch ref. The default checkout
160+
# pins to the dispatch commit (pre-bump), which predates the changelog finalization and the
161+
# version snapshot pushed earlier in this run — so the docs would be redeployed from stale
162+
# content (e.g. the changelog stuck at "not yet released").
163+
ref: ${{ github.ref_name }}
158164
secrets: inherit

0 commit comments

Comments
 (0)