From c0fa6a4840b0ffbd3e0d8006a8a2d39df61aec14 Mon Sep 17 00:00:00 2001 From: Nikolay Telepenin Date: Tue, 16 Jul 2019 10:17:38 +0300 Subject: [PATCH 1/2] Updating prod+test from one deploy.sh --- deploy.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 2d8f0517b..17e105304 100644 --- a/deploy.sh +++ b/deploy.sh @@ -9,8 +9,16 @@ yarn docs:build # navigate into the build output directory cd docs/.vuepress/dist +if [[ "$CIRCLE_BRANCH" == 'dev' ]]; then + domain="docs.cloudlinux.com" + repo="cloudlinux-doc" +else + domain="docs-dev.cloudlinux.com" + repo="cloudlinux-doc-test" +fi + # if you are deploying to a custom domain -echo 'docs.cloudlinux.com' > CNAME +echo $domain > CNAME git config --global user.email "telepenin.nikolay@gmail.com" git config --global user.name "circle-ci" @@ -20,6 +28,6 @@ git add -A git commit -m 'deploy [skip ci]' # if you are deploying to https://.github.io/ -git push -f git@github.com:cloudlinux/cloudlinux-doc.git master:gh-pages +git push -f git@github.com:cloudlinux/$repo.git master:gh-pages cd - \ No newline at end of file From caf2330dac76cef6bdb91ac111c9d1b922517782 Mon Sep 17 00:00:00 2001 From: Nikolay Telepenin Date: Tue, 16 Jul 2019 10:32:25 +0300 Subject: [PATCH 2/2] Add fingerprints for pushing into test repo --- .circleci/config.yml | 1 + deploy.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c4ef915c3..aa3ef4f83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: fingerprints: - "02:d5:63:28:6b:94:5d:76:08:42:ab:1e:b2:b7:80:bb" - "c4:87:62:5a:20:92:4e:14:e0:e0:59:4c:41:f3:43:55" + - "d0:f5:bb:db:3c:9e:fd:33:45:dc:90:36:e8:c1:c5:bf" - restore_cache: keys: - yarn-packages-{{ checksum "yarn.lock" }} diff --git a/deploy.sh b/deploy.sh index 17e105304..5ea223505 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # abort on errors -set -e +set -xe # build yarn docs:build @@ -9,6 +9,7 @@ yarn docs:build # navigate into the build output directory cd docs/.vuepress/dist +echo "$CIRCLE_BRANCH" if [[ "$CIRCLE_BRANCH" == 'dev' ]]; then domain="docs.cloudlinux.com" repo="cloudlinux-doc"