-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-hugo-pipeline.yml
38 lines (35 loc) · 1.33 KB
/
azure-hugo-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Trigger this pipeline on any change to the git repo - for any branch
trigger:
branches:
include:
- '*'
#Use the 'azure advent' variable group setup in the DevOps portal (Pipelines > Library > Variable Groups)
variables:
- group: Azure Advent
stages:
# Build Live site ready for deployment (only trigger on 'master' branch)
- stage: Build_Live_Site
jobs:
- template: azure-hugo-build.yml
parameters:
name: build_live_site
displayName: Build the Live site
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
hugo_version: 0.59.1
hugo_baseUrl: $(AzureAdventLiveUrl)
hugo_params: '--minify'
storage_account: $(AzureAdventLiveStorAcct)
storage_key: $(AzureAdventLiveStorKey)
build_tag: hugo-live
# Deploy live site artifacts to azure storage account (only trigger on 'master' branch)
- stage: Deploy_Live_Site
dependsOn: Build_Live_Site
jobs:
- template: azure-hugo-deploy.yml
parameters:
name: deploy_live_site
displayName: Deploy the Live site
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
storage_account: $(AzureAdventLiveStorAcct)
storage_key: $(AzureAdventLiveStorKey)
build_tag: hugo-live