Skip to content

Instantly share code, notes, and snippets.

@zloeber
Created January 2, 2020 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zloeber/777c345d69998f054a78e076860e5d02 to your computer and use it in GitHub Desktop.
Save zloeber/777c345d69998f054a78e076860e5d02 to your computer and use it in GitHub Desktop.
hugo multi-provider publish with azure devops
name: $(BuildDefinitionName).$(DayOfYear)$(Rev:.r)
trigger:
batch: true
branches:
include:
- master
- develop
# Don't trigger on PRs
pr: none
resources:
repositories:
- repository: pipelines
type: github
endpoint: github_services
name: zloeber/azure-pipeline-library
stages:
## Build Hugo site (DEV)
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/develop') }}:
- template: build/hugo-generate.yml@pipelines
parameters:
initialize: true
baseurl: 'https://zacharyloeber-dev.onrender.com/'
testhtml: 'false'
staticpath: './docs'
contentpath: './content'
drafts: 'true'
- template: deploy/git-folder.yml@pipelines
parameters:
repo: 'https://github.com/zloeber/dev.zacharyloeber.com-content.git'
branch: 'master'
path: 'docs'
environment: 'dev'
## Build Hugo site (PROD)
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
- template: build/hugo-generate.yml@pipelines
parameters:
initialize: true
site: 'zacharyloeber.com'
baseurl: 'https://zacharyloeber.com/'
staticpath: 'docs'
contentpath: './content'
testhtml: 'false'
- template: deploy/git-folder.yml@pipelines
parameters:
repo: 'https://github.com/zloeber/zacharyloeber.com-content.git'
branch: 'master'
path: 'docs'
environment: 'production'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment