diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 5986605a7..52b48db8c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -3,8 +3,6 @@ on: push: branches: - 'main' - - 'stable' - - '!docs' tags: - '**' workflow_dispatch: @@ -12,6 +10,16 @@ on: ref: description: 'The branch, tag or SHA to checkout' required: true + ref_type: + type: choice + description: 'Branch or tag' + options: + - branch + - tag + required: true +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: build: name: Build documentation @@ -77,7 +85,7 @@ jobs: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} BRANCH_NAME: ${{ github.event.inputs.ref || needs.build.outputs.BRANCH_NAME }} - BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }} + BRANCH_OR_TAG: ${{ github.event.inputs.ref_type || needs.build.outputs.BRANCH_OR_TAG }} SHA: ${{ needs.build.outputs.SHA }} steps: - name: Checkout repository @@ -115,14 +123,14 @@ jobs: path: 'out' - name: Extract package and semver from tag - if: ${{ github.event.inputs.ref || env.BRANCH_OR_TAG == 'tag' }} + if: ${{ github.event.inputs.ref_type === 'tag' || env.BRANCH_OR_TAG == 'tag' }} id: extract-tag uses: ./packages/actions/src/formatTag with: tag: ${{ env.BRANCH_NAME }} - name: Move docs to correct directory - if: ${{ (github.event.inputs.ref || env.BRANCH_OR_TAG == 'tag') && matrix.package == steps.extract-tag.outputs.package }} + if: ${{ (github.event.inputs.ref_type == 'tag' || env.BRANCH_OR_TAG == 'tag') && matrix.package == steps.extract-tag.outputs.package }} env: PACKAGE: ${{ steps.extract-tag.outputs.package }} SEMVER: ${{ steps.extract-tag.outputs.semver }} @@ -134,7 +142,7 @@ jobs: fi - name: Move docs to correct directory - if: ${{ !github.event.inputs.ref && env.BRANCH_OR_TAG == 'branch' }} + if: ${{ !github.event.inputs.ref_type == 'branch' && env.BRANCH_OR_TAG == 'branch' }} env: PACKAGE: ${{ matrix.package }} run: | diff --git a/.github/workflows/npm-auto-deprecate.yml b/.github/workflows/npm-auto-deprecate.yml index d9dab1a11..203227ee8 100644 --- a/.github/workflows/npm-auto-deprecate.yml +++ b/.github/workflows/npm-auto-deprecate.yml @@ -1,8 +1,8 @@ name: npm auto deprecate on: - workflow_dispatch: schedule: - cron: '0 1 * * *' + workflow_dispatch: jobs: npm-auto-deprecate: name: npm auto deprecate diff --git a/.github/workflows/publish-dev-docker.yml b/.github/workflows/publish-dev-docker.yml index 8b3b85a83..33e062448 100644 --- a/.github/workflows/publish-dev-docker.yml +++ b/.github/workflows/publish-dev-docker.yml @@ -1,8 +1,8 @@ name: Publish dev docker images on: - workflow_dispatch: schedule: - cron: '0 */12 * * *' + workflow_dispatch: jobs: docker-publish: name: Docker publish diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 2ecd88a29..cbc031e30 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -1,8 +1,8 @@ name: Publish dev on: - workflow_dispatch: schedule: - cron: '0 */12 * * *' + workflow_dispatch: jobs: npm-publish: name: npm publish diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 74e26b7e1..8d58a5805 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,10 @@ name: Tests -on: [push, pull_request] +on: + push: + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true jobs: tests: name: Tests @@ -31,5 +36,5 @@ jobs: run: yarn test - name: Upload Coverage - uses: ./packages/actions/src/uploadCoverage if: github.repository_owner == 'discordjs' + uses: ./packages/actions/src/uploadCoverage