Skip to content

Instantly share code, notes, and snippets.

@bmorrisondev
Created March 26, 2020 21:54
Show Gist options
  • Save bmorrisondev/e74310e00feed27f8d9130762441f292 to your computer and use it in GitHub Desktop.
Save bmorrisondev/e74310e00feed27f8d9130762441f292 to your computer and use it in GitHub Desktop.
An #Azure DevOps build pipeline for #GatsbyJS (or other #nodejs) projects
# Whenever a new commit is added to 'master', this build will trigger.
trigger:
- master
# Use an Azure VM with Ubuntu to build this poroject.
pool:
vmImage: 'ubuntu-latest'
# Our first step preps the VM to build our project.
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
# Issue the commands for installing and building the project.
- script: |
npm install
npm run build
displayName: 'npm install and build'
# Publish the build artifacts into Azure DevOps
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Pipeline.Workspace)/s/public'
ArtifactName: 'drop'
publishLocation: 'Container'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment