I am having a Next.js project which is in Azure Repo and i want to deploy the application in Vercel. I have two branches main and develop where the main branch is used for Production and develop for dev activities. In this for main branch i have added a custom domain in vercel.
I want to add a custom domain for the preview . I have used the below script in Azure pipeline but i am not sure how to add the custom domain in this pipeline.
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
- develop
pool:
vmImage: ubuntu-latest
jobs:
- job: deploy_main
displayName: Deploy to Production
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'main'))
steps:
- task: vercel-deployment-task@1
inputs:
vercelProjectId: '***'
vercelOrgId: '***'
vercelToken: $(VERCEL_TOKEN)
production: true
- job: deploy_develop
displayName: Deploy to Preview
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'develop'))
steps:
- task: vercel-deployment-task@1
inputs:
vercelProjectId: '***'
vercelOrgId: '***'
vercelToken: $(VERCEL_TOKEN)
production: false
As well as when i the pipeline runs the deployment becomes successful but the pipeline shows the following error