From 998c95da51eca0c629d3ca6bbb11b1ee1ddaa786 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:10:02 +0800 Subject: [PATCH 1/4] test pr deploy --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 98d81bff9f3..cd0820775ac 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: branchName: - description: 'Branch to deploy' + description: 'Branch to deploy .' required: true env: From 2f11e7c08764855ffdddc3aa0b8f85ad99e904af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E9=AB=98=E7=8C=9B?= Date: Thu, 25 Jan 2024 11:04:32 +0800 Subject: [PATCH 2/4] test pr deploy --- .github/workflows/deploy_preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index cd0820775ac..98d81bff9f3 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: branchName: - description: 'Branch to deploy .' + description: 'Branch to deploy' required: true env: From 6206ceb49b26b987adcde5e0715cc83adf500e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E9=AB=98=E7=8C=9B?= Date: Thu, 25 Jan 2024 15:00:44 +0800 Subject: [PATCH 3/4] fix: cicd , add pull_request_target --- .github/workflows/deploy_preview.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 9079ddd4b5c..fc2969b7a1e 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -1,11 +1,11 @@ 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 }} From 43631a32718bfa287dfcb10e95087b0ef5a2d3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E9=AB=98=E7=8C=9B?= Date: Thu, 25 Jan 2024 15:17:03 +0800 Subject: [PATCH 4/4] fix: cicd, vercel domain suffix secret --- .github/workflows/deploy_preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index fc2969b7a1e..f392e3de996 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -12,7 +12,7 @@ env: 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