diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 98d81bff9f3..9079ddd4b5c 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -8,6 +8,7 @@ on: 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 }} @@ -63,14 +64,13 @@ jobs: env: META_TAG: ${{ steps.hash_branch.outputs.digest }}-${{ github.run_number }}-${{ github.run_attempt}} run: | - env vercel pull --yes --environment=preview --token=${VERCEL_TOKEN} vercel build --token=${VERCEL_TOKEN} vercel deploy --prebuilt --archive=tgz --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }} vercel ls --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }} &> vercel-output DEFAULT_URL=$(cat vercel-output | grep http | awk '{print $2}') - ALIAS_URL=$(vercel alias set ${DEFAULT_URL} ${{ steps.set_env.outputs.VERCEL_ALIAS_DOMAIN }} --token=${VERCEL_TOKEN} | awk '{print $3}') + ALIAS_URL=$(vercel alias set ${DEFAULT_URL} ${{ steps.set_env.outputs.VERCEL_ALIAS_DOMAIN }} --token=${VERCEL_TOKEN} --scope ${VERCEL_TEAM}| awk '{print $3}') echo "New preview URL: ${DEFAULT_URL}" echo "New alias URL: ${ALIAS_URL}"