@@ -26,20 +26,26 @@ jobs:
2626 - SOURCE_BRANCH : master
2727 - TARGET_BRANCH : gh-pages
2828 steps :
29+ - checkout
30+ - restore_cache :
31+ keys :
32+ - v1-dependencies-{{ checksum "package.json" }}
33+ - v1-dependencies-
34+ - run : npm install
35+ - save_cache :
36+ paths :
37+ - node_modules
38+ key : v1-dependencies-{{ checksum "package.json" }}
39+ - run : npm test
40+ - run : npm run build
2941 - deploy :
3042 name : Deploy to Github Pages
3143 command : |
3244 if [ $CIRCLE_BRANCH == $SOURCE_BRANCH ]; then
3345 git config --global user.email $GH_EMAIL
3446 git config --global user.name $GH_NAME
3547
36- <<<<<<< HEAD
37- touch ~/.ssh/known_hosts
38- =======
39- >>>>>>> Fixed: github.com key auth.
40- ssh-keyscan github.com >> ~/.ssh/known_hosts
41-
42- git clone $CIRCLE_REPOSITORY_URL out
48+ git clone https://${GH_TOKEN}@github.com/developersdo/opensource.git out
4349
4450 cd out
4551 git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
@@ -63,19 +69,25 @@ jobs:
6369 - SOURCE_BRANCH : master
6470 - TARGET_BRANCH : gh-pages
6571 steps :
72+ - checkout
73+ - restore_cache :
74+ keys :
75+ - v1-dependencies-{{ checksum "package.json" }}
76+ - v1-dependencies-
77+ - run : npm install
78+ - save_cache :
79+ paths :
80+ - node_modules
81+ key : v1-dependencies-{{ checksum "package.json" }}
82+ - run : npm test
83+ - run : npm run build
6684 - run :
6785 name : Scraping Github data
6886 command : |
6987 if [ $CIRCLE_BRANCH == $SOURCE_BRANCH ]; then
7088 git config --global user.email $GH_EMAIL
7189 git config --global user.name $GH_NAME
7290
73- <<<<<<< HEAD
74- touch ~/.ssh/known_hosts
75- =======
76- >>>>>>> Fixed: github.com key auth.
77- ssh-keyscan github.com >> ~/.ssh/known_hosts
78-
7991 npm run refresh
8092
8193 git add -A
0 commit comments