Skip to content

Commit cb6e64f

Browse files
committed
Extract Branch Name
1 parent e5747fe commit cb6e64f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/build-reference.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
env:
99
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
10-
GENERATED_BRANCH_NAME: ${GITHUB_REPOSITORY}/${GITHUB_REF##*/}
1110

1211
jobs:
1312
build:
@@ -17,10 +16,13 @@ jobs:
1716
uses: actions/checkout@v2
1817
- name: Generate antora.yml
1918
run: ./gradlew :spring-security-docs:generateAntora
19+
- name: Extract Branch Name
20+
id: extract_branch_name
21+
run: echo "##[set-output name=branch_name;]$(echo ${GITHUB_REF##*/})"
2022
- name: Push generated antora files to the spring-generated-docs
2123
uses: JamesIves/[email protected]
2224
with:
23-
branch: ${{ env.GENERATED_BRANCH_NAME }} # The branch the action should deploy to.
25+
branch: ${{ steps.extract_branch_name.outputs.branch_name }} # The branch the action should deploy to.
2426
folder: "docs/build/generateAntora" # The folder the action should deploy.
2527
repository-name: "spring-io/spring-generated-docs"
2628
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

0 commit comments

Comments
 (0)