Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: Doc release
name: Release docs

on:
# Runs when manually triggered from the GitHub UI.
workflow_dispatch:
inputs:
ref:
description: Git ref to checkout (branch, tag, or SHA). Defaults to the default branch.
required: false
type: string
default: ""

# Runs when invoked by another workflow.
workflow_call:
inputs:
ref:
description: Git ref to checkout (branch, tag, or SHA)
required: true
type: string

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

jobs:
release_docs:
name: Doc release
name: Release docs
environment:
name: github-pages
permissions:
Expand All @@ -31,11 +37,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Determine checkout ref
id: resolve_ref
env:
INPUT_REF: ${{ inputs.ref }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
REF="${INPUT_REF:-$DEFAULT_BRANCH}"
echo "ref=$REF" >> "$GITHUB_OUTPUT"

- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
ref: ${{ env.CHECKOUT_REF }}
ref: ${{ steps.resolve_ref.outputs.ref }}

- name: Set up Node
uses: actions/setup-node@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
contents: write
pages: write
id-token: write
uses: ./.github/workflows/_release_docs.yaml
uses: ./.github/workflows/manual_release_docs.yaml
with:
# Use the version_docs commit to include both changelog and versioned docs.
ref: ${{ needs.version_docs.outputs.version_docs_commitish }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
contents: write
pages: write
id-token: write
uses: ./.github/workflows/_release_docs.yaml
uses: ./.github/workflows/manual_release_docs.yaml
with:
# Use the same ref as the one that triggered the workflow.
ref: ${{ github.ref }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
contents: write
pages: write
id-token: write
uses: ./.github/workflows/_release_docs.yaml
uses: ./.github/workflows/manual_release_docs.yaml
with:
# Use the ref from the changelog update to include the updated changelog.
ref: ${{ needs.changelog_update.outputs.changelog_commitish }}
Expand Down
Loading