@@ -3,23 +3,17 @@ name: Version docs
33on :
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 : " "
126
137 # Runs when invoked by another workflow.
148 workflow_call :
159 inputs :
1610 ref :
17- description : Git ref to checkout (branch, tag, or SHA)
11+ description : Git ref to checkout.
1812 required : true
1913 type : string
2014 outputs :
2115 version_docs_commitish :
22- description : The commit SHA of the versioned docs commit
16+ description : The commit SHA of the versioned docs commit.
2317 value : ${{ jobs.version_docs.outputs.version_docs_commitish }}
2418
2519concurrency :
@@ -43,20 +37,11 @@ jobs:
4337 contents : write
4438
4539 steps :
46- - name : Determine checkout ref
47- id : resolve_ref
48- env :
49- INPUT_REF : ${{ inputs.ref }}
50- DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
51- run : |
52- REF="${INPUT_REF:-$DEFAULT_BRANCH}"
53- echo "ref=$REF" >> "$GITHUB_OUTPUT"
54-
5540 - name : Checkout repository
5641 uses : actions/checkout@v6
5742 with :
5843 token : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
59- ref : ${{ steps.resolve_ref.outputs.ref }}
44+ ref : ${{ inputs.ref || github.event.repository.default_branch }}
6045
6146 - name : Set up Node
6247 uses : actions/setup-node@v6
@@ -123,7 +108,7 @@ jobs:
123108 add : website/versioned_docs website/versioned_sidebars website/versions.json
124109 message : " docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
125110 default_author : github_actions
126- # Required: checkout may leave a detached HEAD when invoked with a SHA ref .
111+ # `actions/ checkout` detaches HEAD on SHA refs; EndBug needs a branch to push .
127112 new_branch : ${{ github.event.repository.default_branch }}
128113
129114 - name : Resolve output commitish
0 commit comments