allow PR previews to be manually re-run

This commit is contained in:
Kyle Hensel 2025-08-04 20:53:25 +12:00
parent 2d53ca9b69
commit f955b26875
No known key found for this signature in database
GPG key ID: A6481E3E38D544EC
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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