From 0e20a4d28d80808dfa2a23bae3db64235c0b736e Mon Sep 17 00:00:00 2001 From: Stefan M Date: Thu, 6 Jun 2019 11:34:45 +0200 Subject: [PATCH] Use exampleSite content for page building --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1abacab..961b04e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,9 +33,15 @@ jobs: name: Replace default config working_directory: my-site command: | + if [[ ${CIRCLE_BRANCH} == "*pull*" ]]; then + git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME + branch=BRANCHNAME + else + branch=${CIRCLE_BRANCH} + fi rm config.toml apk add curl - curl -O https://raw.githubusercontent.com/StefMa/hugo-fresh/master/exampleSite/config.yaml + curl https://codeload.github.com/stefma/hugo-fresh/tar.gz/$branch | tar -xz --strip=2 hugo-fresh-$branch/exampleSite/ - run: name: Replace baseUrl in config working_directory: my-site