From badbe96b1c51bbd666c0f8f3007e964cb610cc62 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sun, 13 Oct 2019 17:58:49 +0200 Subject: [PATCH 1/5] Adding CircleCI build for documentation --- .circleci/config.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 40bb3d16c..e62738ee1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,6 +83,18 @@ jobs: name: Push image command: docker push $IMAGE_NAME:$IMAGE_TAG + build-and-deploy-gh-pages: + docker: + - image: circleci/python:3.7 + steps: + - run: + name: "Install Mkdocs and Material theme" + command: | + pip install --user mkdocs mkdocs-material + - run: + name: "Build and push site" + command: mkdocs gh-deploy + workflows: version: 2 build-images: @@ -107,3 +119,9 @@ workflows: only: - master - dev + documentation-update: + jobs: + - build-and-deploy-gh-pages: + filters: + branches: + only: master From f0060d10dd727ba5b2d737629e15a0f63a7102a4 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sun, 13 Oct 2019 18:00:08 +0200 Subject: [PATCH 2/5] Forgot to do code checkout --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e62738ee1..aae110af4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,6 +87,7 @@ jobs: docker: - image: circleci/python:3.7 steps: + - checkout - run: name: "Install Mkdocs and Material theme" command: | From e76a53adc860060769215f7eb818cd98eca44ffa Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sun, 13 Oct 2019 18:16:19 +0200 Subject: [PATCH 3/5] Add name for CircleCI commits --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index aae110af4..062eae570 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,6 +88,9 @@ jobs: - image: circleci/python:3.7 steps: - checkout + - run: + name: "Set Git name for commits" + command: git config --global user.name "CircleCI" - run: name: "Install Mkdocs and Material theme" command: | From 4c24d2e3823a73fc305c86ad5695b167f1058640 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sun, 13 Oct 2019 18:33:49 +0200 Subject: [PATCH 4/5] Stop builds triggering on commits to gh-pages branch --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 062eae570..377378aec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,6 +109,7 @@ workflows: branches: only: - beta + ignore: gh-pages - build-armhf-image: context: dockerhub filters: @@ -116,6 +117,7 @@ workflows: only: - master - dev + ignore: gh-pages - build-arm64-image: context: dockerhub filters: @@ -123,9 +125,11 @@ workflows: only: - master - dev + ignore: gh-pages documentation-update: jobs: - build-and-deploy-gh-pages: filters: branches: only: master + ignore: gh-pages From cb89eb4e6a768429a16038bb6c1c3d15bca383c8 Mon Sep 17 00:00:00 2001 From: Kristian Haugene Date: Sun, 13 Oct 2019 18:46:34 +0200 Subject: [PATCH 5/5] New tactic to stop builds triggering on gh-pages branch --- .circleci/config.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 377378aec..9666c7e04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,11 +93,10 @@ jobs: command: git config --global user.name "CircleCI" - run: name: "Install Mkdocs and Material theme" - command: | - pip install --user mkdocs mkdocs-material + command: pip install --user mkdocs mkdocs-material - run: name: "Build and push site" - command: mkdocs gh-deploy + command: mkdocs gh-deploy --message "Deployed {sha} with MkDocs version {version}. [skip ci]" workflows: version: 2 @@ -109,7 +108,6 @@ workflows: branches: only: - beta - ignore: gh-pages - build-armhf-image: context: dockerhub filters: @@ -117,7 +115,6 @@ workflows: only: - master - dev - ignore: gh-pages - build-arm64-image: context: dockerhub filters: @@ -125,11 +122,9 @@ workflows: only: - master - dev - ignore: gh-pages documentation-update: jobs: - build-and-deploy-gh-pages: filters: branches: only: master - ignore: gh-pages