Skip to content

Commit 0f4dd21

Browse files
authored
ci: build release docs from the branch tip, not the dispatch ref (#935)
Aligns the release docs deploy with apify/crawlee-python#1946, so all three Python repos build and deploy docs the same way. In the stable release the docs build checked out the workflow-dispatch ref (the pre-bump commit), which predates the changelog finalization and the version snapshot pushed earlier in the run. This repo wasn't visibly affected — the `Update docs theme` step's `git pull --rebase` already moves the build to the latest master — but that reliance was implicit. The build now checks out the up-to-date branch tip (`github.ref_name`) explicitly, via a new optional `ref` input on `manual_release_docs.yaml`. Other entry points (on-master docs deploys, manual dispatches) are unaffected because `ref` defaults to the triggering ref. Unlike here, crawlee-python lacks the theme-update step, so there the stale ref actually broke the deployed changelog (stuck at "not yet released") — see apify/crawlee-python#1946 for the full diagnosis.
1 parent f26a010 commit 0f4dd21

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
@@ -144,6 +144,12 @@ jobs:
144144
id-token: write
145145
checks: read
146146
uses: ./.github/workflows/manual_release_docs.yaml
147+
with:
148+
# Build from the up-to-date branch tip, not the workflow-dispatch ref. The default checkout
149+
# pins to the dispatch commit (pre-bump), which predates the changelog finalization and the
150+
# version snapshot pushed earlier in this run — so the docs would be redeployed from stale
151+
# content (e.g. the changelog stuck at "not yet released").
152+
ref: ${{ github.ref_name }}
147153
secrets: inherit
148154

149155
trigger_docker_build:

0 commit comments

Comments
 (0)