Skip to content

Commit ee11f92

Browse files
author
Ben Grynhaus
committed
Merge branch 'master' into render-prop-update-fix
2 parents da247f0 + c994049 commit ee11f92

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

.circleci/config.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
jobs:
33
build:
4+
ignore:
5+
- gh-pages
46
docker:
57
# specify the version you desire here
68
- image: circleci/node:10-browsers
7-
89
working_directory: ~/repo
9-
1010
steps:
1111
- checkout
1212

@@ -46,10 +46,14 @@ jobs:
4646
docker:
4747
# specify the version you desire here
4848
- image: circleci/node:10-browsers
49-
5049
working_directory: ~/repo
51-
50+
environment:
51+
- SOURCE_BRANCH: master
52+
- TARGET_BRANCH: gh-pages
5253
steps:
54+
- add_ssh_keys:
55+
fingerprints:
56+
- '3a:38:3d:25:c1:1e:d8:ec:69:a0:13:3c:c6:c9:24:a9'
5357
- checkout
5458

5559
# Download and cache dependencies
@@ -75,11 +79,28 @@ jobs:
7579
- deploy:
7680
command: |
7781
if [ "${CIRCLE_BRANCH}" == "master" ]; then
78-
git config user.name "CircleCI"
79-
git config user.email "[email protected]"
82+
git config --global user.name "CircleCI"
83+
git config --global user.email "[email protected]"
84+
85+
git clone $CIRCLE_REPOSITORY_URL out
86+
87+
cd out
88+
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
89+
git rm -rf .
90+
cd ..
91+
92+
npm run build:demo:github
93+
94+
cp -a docs/. out/.
95+
96+
mkdir -p out/.circleci && cp -a .circleci/. out/.circleci/.
97+
cd out
98+
8099
git add -A
81-
git commit -m 'Deploy to GitHub pages [ci]'
82-
git push
100+
git commit -m "Automated deployment to GitHub Pages: ${CIRCLE_SHA1}" --allow-empty
101+
102+
git push origin $TARGET_BRANCH
103+
83104
fi
84105
workflows:
85106
version: 2

0 commit comments

Comments
 (0)