3

When creating a pipeline on dev.azure.com, how do you select a specific folder at Github. For example: https://github.com/username/projectname/tree/main/frontend.

I don't want to use the https://github.com/username/projectname/tree/main, but only the frontend folder.

I got the backend and frontend in the same github project, but I only need to create a pipeline for the angular frontend to create a static website.

I tried google and everything, but can't find the answer.

# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- main

pool:
  vmImage: ubuntu-latest

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '10.x'
  displayName: 'Install Node.js'

- script: |
    npm install -g @angular/cli
    npm install
    ng build --prod
  displayName: 'npm install and build'
1
  • 1
    Did you look at the documentation for YAML pipelines? It explains how to limit triggers to specific folders. Commented Jun 4, 2021 at 14:36

1 Answer 1

4
- script: |
    cd ./frontend
    npm install -g @angular/cli
    npm install
    ng build --prod
  displayName: 'npm install and build'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.