From 3bc771a0d9affad24dff4b2babb5f84f90e7a66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E9=AB=98=E7=8C=9B?= Date: Wed, 24 Jan 2024 22:03:47 +0800 Subject: [PATCH] add workflow_dispatch --- .github/workflows/deploy_preview.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 7bc245ddc3e..98d81bff9f3 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,5 +1,12 @@ name: VercelPreviewDeployment +on: + workflow_dispatch: + inputs: + branchName: + description: 'Branch to deploy' + required: true + env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} @@ -11,17 +18,13 @@ permissions: statuses: write pull-requests: write -on: - pull_request: - types: - - opened - - synchronize - jobs: deploy-preview: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.branchName }} - name: Extract branch name shell: bash