From 8b3daec3a3cde14afd59f0e433514e4f1e81e218 Mon Sep 17 00:00:00 2001 From: Rubens Mariuzzo Date: Tue, 23 Oct 2018 23:59:00 -0400 Subject: [PATCH] Fixed: circle ci config. --- .circleci/config.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d78ee7..1451a51 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,18 @@ jobs: - SOURCE_BRANCH: master - TARGET_BRANCH: gh-pages steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + - v1-dependencies- + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: npm test + - run: npm run build - deploy: name: Deploy to Github Pages command: | @@ -33,13 +45,7 @@ jobs: git config --global user.email $GH_EMAIL git config --global user.name $GH_NAME -<<<<<<< HEAD - touch ~/.ssh/known_hosts -======= ->>>>>>> Fixed: github.com key auth. - ssh-keyscan github.com >> ~/.ssh/known_hosts - - git clone $CIRCLE_REPOSITORY_URL out + git clone https://${GH_TOKEN}@github.com/developersdo/opensource.git out cd out git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH @@ -63,6 +69,18 @@ jobs: - SOURCE_BRANCH: master - TARGET_BRANCH: gh-pages steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + - v1-dependencies- + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: npm test + - run: npm run build - run: name: Scraping Github data command: | @@ -70,12 +88,6 @@ jobs: git config --global user.email $GH_EMAIL git config --global user.name $GH_NAME -<<<<<<< HEAD - touch ~/.ssh/known_hosts -======= ->>>>>>> Fixed: github.com key auth. - ssh-keyscan github.com >> ~/.ssh/known_hosts - npm run refresh git add -A