@@ -26,20 +26,26 @@ jobs:
26
26
- SOURCE_BRANCH : master
27
27
- TARGET_BRANCH : gh-pages
28
28
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
29
41
- deploy :
30
42
name : Deploy to Github Pages
31
43
command : |
32
44
if [ $CIRCLE_BRANCH == $SOURCE_BRANCH ]; then
33
45
git config --global user.email $GH_EMAIL
34
46
git config --global user.name $GH_NAME
35
47
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
43
49
44
50
cd out
45
51
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
@@ -63,19 +69,25 @@ jobs:
63
69
- SOURCE_BRANCH : master
64
70
- TARGET_BRANCH : gh-pages
65
71
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
66
84
- run :
67
85
name : Scraping Github data
68
86
command : |
69
87
if [ $CIRCLE_BRANCH == $SOURCE_BRANCH ]; then
70
88
git config --global user.email $GH_EMAIL
71
89
git config --global user.name $GH_NAME
72
90
73
- <<<<<<< HEAD
74
- touch ~/.ssh/known_hosts
75
- =======
76
- >>>>>>> Fixed: github.com key auth.
77
- ssh-keyscan github.com >> ~/.ssh/known_hosts
78
-
79
91
npm run refresh
80
92
81
93
git add -A
0 commit comments