File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ # we use a rw SSH key instead of the default one injected by CircleCI because we
2
+ # use it for deploy as well
3
+ anchor_2 : &add_ssh_keys
4
+ fingerprints :
5
+ - " fb:83:7b:63:34:46:87:5f:df:b6:84:7f:af:fd:d9:cc"
6
+
7
+ defaults : &defaults
8
+ working_directory : /tmp/manual
9
+ docker :
10
+ - image : perl:latest
11
+
12
+ version : 2
13
+ jobs :
14
+ build :
15
+ << : *defaults
16
+ steps :
17
+ - add_ssh_keys : *add_ssh_keys
18
+ - checkout
19
+
20
+ - run :
21
+ name : Install pandoc
22
+ command : apt-get update && apt-get install -y pandoc
23
+
24
+ - run : perl make-html.pl
25
+
26
+ - persist_to_workspace :
27
+ root : /tmp/manual
28
+ paths :
29
+ - html
30
+ - .circleci
31
+
32
+ deploy :
33
+ << : *defaults
34
+ steps :
35
+ - attach_workspace :
36
+ at : /tmp/manual
37
+
38
+ - add_ssh_keys : *add_ssh_keys
39
+ - checkout :
40
+ path : /tmp/gh-pages
41
+ - deploy :
42
+ name : Deploy
43
+ command : |
44
+ git config --global user.email no-reply@slic3r.org
45
+ git config --global user.name "Deploy Bot"
46
+ cd /tmp/gh-pages
47
+ git checkout gh-pages || git checkout --orphan gh-pages
48
+ git rm -rf .
49
+ cp -a /tmp/manual/html/. .
50
+ # copy .circleci as well so that the branch filter is honored
51
+ mkdir -p .circleci && cp -a /tmp/manual/.circleci/. .circleci/.
52
+ git add -A
53
+ git commit -m "Automated deployment to GitHub Pages: ${CIRCLE_SHA1}" --allow-empty
54
+ git push origin gh-pages
55
+
56
+ workflows :
57
+ version : 2
58
+ build-test-and-approval-deploy :
59
+ jobs :
60
+ - build :
61
+ filters :
62
+ branches :
63
+ ignore :
64
+ - gh-pages
65
+ - deploy :
66
+ requires :
67
+ - build
68
+ filters :
69
+ branches :
70
+ only :
71
+ - master
72
+ - gh-pages-deploy
You can’t perform that action at this time.
0 commit comments