Created
June 9, 2019 06:38
-
-
Save kurtmkurtm/50867f308c200797742b0ce807fbd789 to your computer and use it in GitHub Desktop.
Azure pipeline to build and publish a hugo blog release - github.com/kurtmkurtm
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
# | |
# Azure pipeline to build and publish a hugo blog release | |
# github.com/kurtmkurtm | |
# | |
trigger: | |
- master | |
pool: | |
vmImage: "ubuntu-16.04" | |
variables: | |
hugo.version: '0.55.6' | |
blog.path: './quickstart' | |
steps: | |
- script: | | |
wget -c https://github.com/gohugoio/hugo/releases/download/v$(hugo.version)/hugo_$(hugo.version)_Linux-64bit.deb | |
displayName: "Download HUGO" | |
- script: 'sudo dpkg -i hugo _ $ (hugo.version) _Linux-64bit.deb' | |
displayName: "Install HUGO" | |
- script: | | |
cd $ (blog.path) | |
hugo --log -v | |
displayName: 'Generate Blog' | |
- task: CopyFiles @ 2 | |
displayName: 'Copy Blog' | |
inputs: | |
SourceFolder: '$ (blog.path) / public' | |
Contents: "**" | |
TargetFolder: '$ (Build.ArtifactStagingDirectory)' | |
- task: PublishBuildArtifacts @ 1 | |
displayName: Publish Blog | |
inputs: | |
PathtoPublish: '$ (Build.ArtifactStagingDirectory)' | |
ArtifactName: Drop | |
publishLocation: 'Container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment