Created
August 22, 2021 20:20
-
-
Save ThomasPe/569af8a2cb6fc1523797e9b4d35110f1 to your computer and use it in GitHub Desktop.
Angular => Azure DevOps => Azure BLOB Storage Deployment
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
trigger: | |
- main | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '14.x' | |
displayName: 'Install Node.js' | |
- script: | | |
npm install -g @angular/cli | |
npm install | |
ng build --prod | |
displayName: 'npm install and build' | |
- task: AzureCLI@2 | |
displayName: 'Clear Static website' | |
inputs: | |
azureSubscription: 'My Subscription' | |
scriptType: 'bash' | |
scriptLocation: 'inlineScript' | |
inlineScript: 'az storage blob delete-batch --account-name mystorageaccount --source "\$web"' | |
- task: AzureCLI@2 | |
displayName: 'Upload new Static Website' | |
inputs: | |
azureSubscription: 'My Subscription' | |
scriptType: 'bash' | |
scriptLocation: 'inlineScript' | |
inlineScript: 'az storage blob upload-batch --account-name mystorageaccount --destination "\$web" --source ''$(Build.Repository.LocalPath)/dist/myappname''' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment