chore: fix generate preview references action (#7901)

This commit is contained in:
Shahed Nasser
2024-07-03 14:10:19 +03:00
committed by GitHub
parent 19d7d01805
commit 5aa62e59e4
3 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
name: Generate Preview Reference [Automated]
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:

View File

@@ -13,7 +13,7 @@ on:
jobs:
api-v2:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_call' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'api' }}
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'api' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
@@ -63,7 +63,7 @@ jobs:
branch-suffix: "timestamp"
ui:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_call' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'ui' }}
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'ui' }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0

View File

@@ -17,7 +17,7 @@ on:
jobs:
references:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
@@ -60,12 +60,12 @@ jobs:
working-directory: www/utils
- name: Generate References
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' }}
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
run: "yarn start generate ${{ github.event.inputs.referenceName }} --merge"
working-directory: www/utils/packages/typedoc-generate-references
- name: Generate References
if: ${{ github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_call' }}
if: ${{ github.event_name != 'workflow_dispatch' || github.event_name == 'schedule' }}
run: "yarn generate:references"
working-directory: www/utils