Created
March 26, 2020 21:54
-
-
Save bmorrisondev/e74310e00feed27f8d9130762441f292 to your computer and use it in GitHub Desktop.
An #Azure DevOps build pipeline for #GatsbyJS (or other #nodejs) projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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