mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +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 }}
|
token: ${{ secrets.DJS_DOCS }}
|
||||||
path: 'out'
|
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
|
- name: Move docs to correct directory
|
||||||
env:
|
env:
|
||||||
PACKAGE: ${{ matrix.package }}
|
PACKAGE: ${{ matrix.package }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p out/${PACKAGE}
|
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
|
- name: Commit and push
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user