Skip to content

Commit 71d83b5

Browse files
vdusekclaude
andauthored
ci: Extract docs release into reusable manual_release_docs.yaml workflow (#858)
Follow-up to #857 ## Summary - Rename `_release_docs.yaml` to `manual_release_docs.yaml` to match the naming convention of other reusable workflows (`manual_version_docs.yaml`, `manual_release_stable.yaml`). - Add an optional `ref` input to `workflow_dispatch` so it can be triggered from the GitHub UI with a specific ref (falling back to the default branch). - Replace the `CHECKOUT_REF` env var approach with a `Determine checkout ref` step, consistent with `manual_version_docs.yaml`. - Update all references in `manual_release_stable.yaml` and `on_master.yaml`. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0ca0dbd commit 71d83b5

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.github/workflows/_release_docs.yaml renamed to .github/workflows/manual_release_docs.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
name: Doc release
1+
name: Release docs
22

33
on:
44
# Runs when manually triggered from the GitHub UI.
55
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: Git ref to checkout (branch, tag, or SHA). Defaults to the default branch.
9+
required: false
10+
type: string
11+
default: ""
612

713
# Runs when invoked by another workflow.
814
workflow_call:
915
inputs:
1016
ref:
17+
description: Git ref to checkout (branch, tag, or SHA)
1118
required: true
1219
type: string
1320

@@ -17,11 +24,10 @@ permissions:
1724
env:
1825
NODE_VERSION: 22
1926
PYTHON_VERSION: 3.14
20-
CHECKOUT_REF: ${{ github.event_name == 'workflow_call' && inputs.ref || github.ref }}
2127

2228
jobs:
2329
release_docs:
24-
name: Doc release
30+
name: Release docs
2531
environment:
2632
name: github-pages
2733
permissions:
@@ -31,11 +37,20 @@ jobs:
3137
runs-on: ubuntu-latest
3238

3339
steps:
40+
- name: Determine checkout ref
41+
id: resolve_ref
42+
env:
43+
INPUT_REF: ${{ inputs.ref }}
44+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
45+
run: |
46+
REF="${INPUT_REF:-$DEFAULT_BRANCH}"
47+
echo "ref=$REF" >> "$GITHUB_OUTPUT"
48+
3449
- name: Checkout repository
3550
uses: actions/checkout@v6
3651
with:
3752
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
38-
ref: ${{ env.CHECKOUT_REF }}
53+
ref: ${{ steps.resolve_ref.outputs.ref }}
3954

4055
- name: Set up Node
4156
uses: actions/setup-node@v6

.github/workflows/manual_release_stable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
contents: write
120120
pages: write
121121
id-token: write
122-
uses: ./.github/workflows/_release_docs.yaml
122+
uses: ./.github/workflows/manual_release_docs.yaml
123123
with:
124124
# Use the version_docs commit to include both changelog and versioned docs.
125125
ref: ${{ needs.version_docs.outputs.version_docs_commitish }}

.github/workflows/on_master.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
contents: write
2929
pages: write
3030
id-token: write
31-
uses: ./.github/workflows/_release_docs.yaml
31+
uses: ./.github/workflows/manual_release_docs.yaml
3232
with:
3333
# Use the same ref as the one that triggered the workflow.
3434
ref: ${{ github.ref }}
@@ -108,7 +108,7 @@ jobs:
108108
contents: write
109109
pages: write
110110
id-token: write
111-
uses: ./.github/workflows/_release_docs.yaml
111+
uses: ./.github/workflows/manual_release_docs.yaml
112112
with:
113113
# Use the ref from the changelog update to include the updated changelog.
114114
ref: ${{ needs.changelog_update.outputs.changelog_commitish }}

0 commit comments

Comments
 (0)