mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ci: replace branch name for documentation
This commit is contained in:
9
.github/workflows/documentation.yml
vendored
9
.github/workflows/documentation.yml
vendored
@@ -82,12 +82,19 @@ jobs:
|
||||
token: ${{ secrets.DJS_DOCS }}
|
||||
path: 'out'
|
||||
|
||||
- uses: frabert/replace-string-action@v2.0
|
||||
id: SHORT_BRANCH_NAME
|
||||
with:
|
||||
pattern: '(^@\w+\/\w+@v?)?(?<semver>\d+.\d+.\d+)-?.*'
|
||||
string: ${{ BRANCH_NAME }}
|
||||
replace-with: '$<semver>'
|
||||
|
||||
- name: Move docs to correct directory
|
||||
env:
|
||||
PACKAGE: ${{ matrix.package }}
|
||||
run: |
|
||||
mkdir -p out/${PACKAGE}
|
||||
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${BRANCH_NAME}.json
|
||||
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${{ steps.SHORT_BRANCH_NAME.outputs.replaced }}.json
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user