From f67fd6e823540b5cc2685061abffcf8ccd092c24 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 16 Dec 2019 15:30:02 -0500 Subject: [PATCH 1/4] ci: deploy documentation on releases --- .circleci/config.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 29a4c16592..12a787fdd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,6 +166,29 @@ jobs: - run: name: Docs tests command: yarn docs-test + - persist_to_workspace: + root: packages/opentelemetry-types/docs + paths: + - out + docs-deploy: + docker: + - image: node:12 + steps: + - checkout + - attach_workspace: + at: packages/opentelemetry-types/docs + - run: + name: Install and configure dependencies + command: | + npm install -g --silent gh-pages@2.0.1 + git config user.email dyladan@users.noreply.github.com + git config user.name "ci-build" + - add_ssh_keys: + fingerprints: + - "1d:a3:60:b5:b4:8d:e7:8a:96:ce:6a:0a:e9:58:4c:54" + - run: + name: Deploy docs to gh-pages branch + command: gh-pages --dist packages/opentelemetry-types/docs/out node8: docker: - image: node:8 @@ -202,7 +225,18 @@ workflows: version: 2 build: jobs: - - lint_&_docs + - lint_&_docs: + filters: + branches: + only: /.*/ + - docs-deploy: + requires: + - lint_&_docs + filters: + tags: + only: /^v\d+\.\d+\.\d+$/ + branches: + ignore: /.*/ - node8 - node10 - node12 From 67630969ee175e580180095d3c0215763af0a860 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 18 Dec 2019 16:41:36 -0500 Subject: [PATCH 2/4] ci: only deploy docs on x.x.0 updates --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 12a787fdd9..c1ca930292 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,7 +234,7 @@ workflows: - lint_&_docs filters: tags: - only: /^v\d+\.\d+\.\d+$/ + only: /^v\d+\.\d+\.0$/ branches: ignore: /.*/ - node8 From 7e31b39fc85aefa9a4b86ed062de69187c616a7a Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 18 Dec 2019 19:20:46 -0500 Subject: [PATCH 3/4] fix: remove personal email from ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c1ca930292..810140ee18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -181,7 +181,7 @@ jobs: name: Install and configure dependencies command: | npm install -g --silent gh-pages@2.0.1 - git config user.email dyladan@users.noreply.github.com + git config user.email noreply@opentelemetry.io git config user.name "ci-build" - add_ssh_keys: fingerprints: From 883f47157878b1137728ff7bb16265f36fb9a929 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 18 Dec 2019 19:49:59 -0500 Subject: [PATCH 4/4] chore: add docs-deploy script --- .circleci/config.yml | 2 +- package.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 810140ee18..7735a0574e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,7 +180,7 @@ jobs: - run: name: Install and configure dependencies command: | - npm install -g --silent gh-pages@2.0.1 + npm install --silent --no-save gh-pages git config user.email noreply@opentelemetry.io git config user.name "ci-build" - add_ssh_keys: diff --git a/package.json b/package.json index 120e8a4688..86b42cd179 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "check": "lerna run check", "predocs-test": "yarn docs", "docs-test": "lerna run docs-test", - "docs": "lerna run docs" + "docs": "lerna run docs", + "docs-deploy": "gh-pages --dist packages/opentelemetry-types/docs/out" }, "repository": "open-telemetry/opentelemetry-js", "keywords": [ @@ -38,6 +39,7 @@ "@commitlint/config-conventional": "^8.2.0", "beautify-benchmark": "^0.2.4", "benchmark": "^2.1.4", + "gh-pages": "^2.1.1", "gts": "^1.1.0", "husky": "^3.0.9", "lerna": "^3.17.0",