I am using multi stage YAML pipelines in Azure DevOps and Where I build in one stage and deploy the artifact to other stages. I have setup a Pull Request build and whenever a new code is pushed all stages in the pipeline are running, which is not desirable.
what i want is whenever a new code is pushed to any branch i want to run the build stage and skip the deploy stages. This option is available by default classic pipeline as build and release are a seperate component earlier