diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index a634e964..75abd909 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -4,6 +4,12 @@ on: pull_request: branches: - main + workflow_dispatch: + inputs: + custom_pr_number: + description: 'Pull Request number (excluding hashtag symbol)' + required: true + type: string permissions: contents: read @@ -42,7 +48,7 @@ jobs: - name: Store pull request number for later use run: | - echo ${{github.event.number}} > ./pr_number + echo ${{github.event.inputs.custom_pr_number || github.event.number}} > ./pr_number - uses: actions/upload-artifact@v4 with: name: pr diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 860fd55c..7d70a467 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -10,7 +10,7 @@ jobs: deploy-preview: environment: pr-previews runs-on: ubuntu-latest - if: ${{github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'}} + if: ${{(github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'workflow_dispatch') && github.event.workflow_run.conclusion == 'success'}} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4