Skip to content

Commit 0cc6865

Browse files
authored
AWS docs deploy workflow - modify release branch to same form (#25678)
Added a step to derive the branch name for deployment.
1 parent ac5ed50 commit 0cc6865

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/docs_deploy_aws.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727
cancel-in-progress: false
2828

2929
env:
30-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
30+
RAW_BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3131

3232
jobs:
3333
build:
@@ -46,6 +46,14 @@ jobs:
4646
- name: Checkout
4747
uses: actions/checkout@v4
4848

49+
- name: Derive branch name
50+
run: |
51+
BRANCH="${RAW_BRANCH_NAME}"
52+
if [[ "$BRANCH" =~ ^release/(.*) ]]; then
53+
BRANCH="v${BASH_REMATCH[1]}"
54+
fi
55+
echo "BRANCH_NAME=$BRANCH" >> $GITHUB_ENV
56+
4957
- name: Setup Node
5058
uses: actions/setup-node@v4
5159
with:

0 commit comments

Comments
 (0)