Skip to content

Commit 3cc96d7

Browse files
committed
ci: replace branch name for documentation
1 parent b94a876 commit 3cc96d7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: .github/workflows/documentation.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,19 @@ jobs:
8282
token: ${{ secrets.DJS_DOCS }}
8383
path: 'out'
8484

85+
- uses: frabert/[email protected]
86+
id: SHORT_BRANCH_NAME
87+
with:
88+
pattern: '(^@\w+\/\w+@v?)?(?<semver>\d+.\d+.\d+)-?.*'
89+
string: ${{ BRANCH_NAME }}
90+
replace-with: '$<semver>'
91+
8592
- name: Move docs to correct directory
8693
env:
8794
PACKAGE: ${{ matrix.package }}
8895
run: |
8996
mkdir -p out/${PACKAGE}
90-
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${BRANCH_NAME}.json
97+
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${{ steps.SHORT_BRANCH_NAME.outputs.replaced }}.json
9198
9299
- name: Commit and push
93100
run: |

0 commit comments

Comments
 (0)