diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 9079ddd4b5c..f392e3de996 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,18 +1,18 @@ name: VercelPreviewDeployment on: + pull_request_target: + types: + - opened + - synchronize workflow_dispatch: - inputs: - branchName: - description: 'Branch to deploy' - required: true env: VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }} VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - VERCEL_DOMAIN_SUFFIX: ".pr.nextchat.dev" + VERCEL_PR_DOMAIN_SUFFIX: ${{ secrets.VERCEL_PR_DOMAIN_SUFFIX }} permissions: contents: read @@ -43,7 +43,7 @@ jobs: id: set_env if: github.event_name == 'pull_request' run: | - echo "VERCEL_ALIAS_DOMAIN=${{ github.event.pull_request.number }}-${{ github.workflow }}.${VERCEL_DOMAIN_SUFFIX}" >> $GITHUB_OUTPUT + echo "VERCEL_ALIAS_DOMAIN=${{ github.event.pull_request.number }}-${{ github.workflow }}.${VERCEL_PR_DOMAIN_SUFFIX}" >> $GITHUB_OUTPUT - name: Install Vercel CLI run: npm install --global vercel@latest