-
Notifications
You must be signed in to change notification settings - Fork 22
/
azure-pipelines.yml
48 lines (39 loc) · 1.45 KB
/
azure-pipelines.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
39
40
41
42
43
44
45
46
47
48
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pr:
autoCancel: true
pool:
vmImage: "windows-2019"
steps:
- checkout: self
displayName: "Checkout repository"
- task: PowerShell@2
name: ResourcesJSON
displayName: "Generating Resources JSON from PSGallery"
inputs:
filePath: "./Get-DscResourceKitInfo.ps1"
pwsh: true
errorActionPreference: continue
# - task: giuliovdev.hugo-extension.hugo-build-task-v2.HugoTask@2
# displayName: "Generate Hugo site"
# inputs:
# destination: "$(Build.ArtifactStagingDirectory)"
# hugoVersion: 0.135.0
- pwsh: |
$hugoUrl = "https://github.com/gohugoio/hugo/releases/download/v0.136.5/hugo_0.136.5_windows-amd64.zip"
$outputPath = ".\hugo.zip"
Invoke-WebRequest -Uri $hugoUrl -OutFile $outputPath
Expand-Archive -Path $outputPath -DestinationPath ".\hugo"
displayName: "Download and Extract Hugo"
- pwsh: |
.\hugo\hugo.exe --source "$(System.DefaultWorkingDirectory)" --destination "$(Build.ArtifactStagingDirectory)" --printI18nWarnings --printPathWarnings --logLevel info
displayName: "Build Hugo Site"
- task: PublishPipelineArtifact@0
displayName: "Publish Hugo site as artifact"
inputs:
artifactName: "dsccommunity"
targetPath: "$(Build.ArtifactStagingDirectory)"