Skip to content

Commit e9eae01

Browse files
committed
chore: support pulling from a branch or sha
Signed-off-by: heitorlessa <[email protected]>
1 parent 5e0dc37 commit e9eae01

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/reusable_publish_docs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Reusable publish documentation
22

33
env:
4-
BRANCH: develop
54
ORIGIN: awslabs/aws-lambda-powertools-python
65

76
on:
@@ -20,6 +19,11 @@ on:
2019
required: false
2120
default: false
2221
type: boolean
22+
git_ref:
23+
description: "Branch or commit ID to checkout from"
24+
required: false
25+
type: string
26+
default: develop
2327

2428
permissions:
2529
contents: write
@@ -36,6 +40,7 @@ jobs:
3640
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3741
with:
3842
fetch-depth: 0
43+
ref: ${{ inputs.git_ref }}
3944
- name: Install poetry
4045
run: pipx install poetry
4146
- name: Set up Python
@@ -56,6 +61,8 @@ jobs:
5661
git config pull.rebase true
5762
git config remote.origin.url >&- || git remote add origin https://github.com/"$ORIGIN"
5863
git pull origin "$BRANCH"
64+
env:
65+
BRANCH: ${{ inputs.git_ref }}
5966
- name: Build docs website and API reference
6067
env:
6168
VERSION: ${{ inputs.version }}

0 commit comments

Comments
 (0)