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 2d8f0517b..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,8 +9,17 @@ 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" +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 +29,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