From dcac2d118da68f19a124425351e4fe82744eb735 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 24 Apr 2019 12:17:15 +0200 Subject: [PATCH] Run Zola build on azure pipelines Produce generated site as artifact. --- azure-pipelines.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7c190cce..52ea16fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,11 +11,6 @@ trigger: # Build post braches - post-* -pr: - branches: - exclude: - - master - pool: vmImage: ubuntu-16.04 @@ -27,5 +22,24 @@ steps: displayName: 'Build Info' continueOnError: true -- script: echo "Nothing to do for master branch" - displayName: "Nothing to do" +- bash: curl -sL https://github.com/getzola/zola/releases/download/v0.6.0/zola-v0.6.0-x86_64-unknown-linux-gnu.tar.gz | tar zxv + displayName: "Download Zola" + +- script: python -m pip install --upgrade pip setuptools wheel + displayName: 'Install Python Tools' + +- script: python -m pip install --user PyGithub + displayName: 'Install PyGithub' + +- script: python before_build.py + displayName: "Run before_build.py script" + workingDirectory: "blog" + +- script: ../zola build + displayName: "Build Site" + workingDirectory: "blog" + +- task: PublishPipelineArtifact@0 + inputs: + artifactName: 'generated_site' + targetPath: 'blog/public'