From 4f0bf3c5aafb935b032ff936650c55900f1684e8 Mon Sep 17 00:00:00 2001 From: rschamp <rschamp@media.mit.edu> Date: Mon, 23 Sep 2019 11:26:24 -0400 Subject: [PATCH] Add config for gh-pages deploy --- .circleci/config.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 114f1ceb1..41096e15f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,6 +109,27 @@ jobs: - run: git tag $RELEASE_VERSION - run: git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION + deploy-gh-pages: + docker: + - image: circleci/node:8.16-browsers + working_directory: ~/repo + steps: + - restore_cache: + keys: + - v1-git-{{ .Revision }} + - v1-git- + - checkout + - run: | + git config --global user.email $(git log --pretty=format:"%ae" -n1) + git config --global user.name $(git log --pretty=format:"%an" -n1) + - restore_cache: + keys: + - v1-build-{{ .Revision }} + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package-lock.json" }} + - run: npm run deploy -- -e $CIRCLE_BRANCH + deploy-requirements: &deploy-requirements requires: - build @@ -128,3 +149,5 @@ workflows: - build - deploy-npm: <<: *deploy-requirements + - deploy-gh-pages: + <<: *deploy-requirements -- GitLab