mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
ci: fix if checks for branch/tag when using workflow dispatch
This commit is contained in:
8
.github/workflows/documentation.yml
vendored
8
.github/workflows/documentation.yml
vendored
@@ -72,7 +72,7 @@ jobs:
|
|||||||
package: ['builders', 'collection', 'discord.js', 'proxy', 'rest', 'voice']
|
package: ['builders', 'collection', 'discord.js', 'proxy', 'rest', 'voice']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ needs.build.outputs.BRANCH_NAME }}
|
BRANCH_NAME: ${{ github.event.inputs.ref || needs.build.outputs.BRANCH_NAME }}
|
||||||
BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }}
|
BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }}
|
||||||
SHA: ${{ needs.build.outputs.SHA }}
|
SHA: ${{ needs.build.outputs.SHA }}
|
||||||
steps:
|
steps:
|
||||||
@@ -115,14 +115,14 @@ jobs:
|
|||||||
path: 'out'
|
path: 'out'
|
||||||
|
|
||||||
- name: Extract package and semver from tag
|
- name: Extract package and semver from tag
|
||||||
if: env.BRANCH_OR_TAG == 'tag'
|
if: ${{ github.event.inputs.ref || env.BRANCH_OR_TAG == 'tag' }}
|
||||||
id: extract-tag
|
id: extract-tag
|
||||||
uses: ./packages/actions/src/formatTag
|
uses: ./packages/actions/src/formatTag
|
||||||
with:
|
with:
|
||||||
tag: ${{ env.BRANCH_NAME }}
|
tag: ${{ env.BRANCH_NAME }}
|
||||||
|
|
||||||
- name: Move docs to correct directory
|
- name: Move docs to correct directory
|
||||||
if: env.BRANCH_OR_TAG == 'tag'
|
if: ${{ github.event.inputs.ref || env.BRANCH_OR_TAG == 'tag' }}
|
||||||
env:
|
env:
|
||||||
PACKAGE: ${{ steps.extract-tag.outputs.package }}
|
PACKAGE: ${{ steps.extract-tag.outputs.package }}
|
||||||
SEMVER: ${{ steps.extract-tag.outputs.semver }}
|
SEMVER: ${{ steps.extract-tag.outputs.semver }}
|
||||||
@@ -131,7 +131,7 @@ jobs:
|
|||||||
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${SEMVER}.json
|
mv docs/${PACKAGE}/docs/docs.json out/${PACKAGE}/${SEMVER}.json
|
||||||
|
|
||||||
- name: Move docs to correct directory
|
- name: Move docs to correct directory
|
||||||
if: env.BRANCH_OR_TAG == 'branch'
|
if: ${{ !github.event.inputs.ref && env.BRANCH_OR_TAG == 'branch' }}
|
||||||
env:
|
env:
|
||||||
PACKAGE: ${{ matrix.package }}
|
PACKAGE: ${{ matrix.package }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user