Created
May 19, 2020 14:09
-
-
Save rithala/749efe0710024faa18304abc82d2dce2 to your computer and use it in GitHub Desktop.
Gatsby Azure DevOps pipeline
This file contains 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
trigger: | |
branches: | |
include: | |
- master | |
- develop | |
paths: | |
include: | |
- src/SPA/* | |
exclude: | |
- src/SPA/README.md | |
variables: | |
workingDir: 'src/SPA/' | |
subcription: '<guid>' | |
accountName: 'accountname' | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: Npm@1 | |
displayName: CI | |
inputs: | |
command: 'ci' | |
workingDir: '$(workingDir)' | |
- task: Npm@1 | |
displayName: Build | |
inputs: | |
command: 'custom' | |
workingDir: '$(workingDir)' | |
customCommand: 'run build' | |
env: | |
API_URL: /api | |
- task: PublishBuildArtifacts@1 | |
displayName: Publish drop | |
inputs: | |
PathtoPublish: '$(workingDir)/public' | |
ArtifactName: 'drop' | |
publishLocation: 'Container' | |
- task: AzureCLI@2 | |
inputs: | |
azureSubscription: '$(subcription)' | |
scriptType: 'bash' | |
scriptLocation: 'inlineScript' | |
inlineScript: 'az storage blob upload-batch -s $(workingDir)/public -d \$web --account-name $(accountName)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment