1
1
docs_deploy : &docs
2
2
docker :
3
3
- image : node:8.10.0
4
+ working_directory : /tmp/gh-pages
4
5
steps :
5
- - add_ssh_keys :
6
- fingerprints :
7
- - " 46:48:1e:6d:00:0e:f2:f8:e5:aa:b9:aa:da:eb:59:4e"
8
6
- run :
9
7
name : Check whether this is the original repo
10
8
command : |
11
9
if [[ "$CIRCLE_PROJECT_USERNAME" != "poldracklab" ]]; then
12
10
echo "Not in poldracklab/sdcflows - skipping docs deploy."
13
11
circleci step halt
14
12
fi
13
+ - add_ssh_keys :
14
+ fingerprints :
15
+ - " 46:48:1e:6d:00:0e:f2:f8:e5:aa:b9:aa:da:eb:59:4e"
16
+ - run :
17
+ name : Install and configure dependencies
18
+ command : |
19
+ npm install -g --silent [email protected]
20
+ git config user.email "[email protected] "
21
+ git config user.name "Documentation Push"
15
22
- checkout
16
23
- attach_workspace :
17
24
at : docs/_build
18
25
- run :
19
26
name : Disable jekyll builds
20
27
command : touch docs/_build/html/.nojekyll
21
- - run :
22
- name : Install and configure dependencies
23
- command : |
24
- npm install -g --silent [email protected]
25
- git config user.email "[email protected] "
26
- git config user.name "ci-build"
27
28
- run :
28
29
name : Deploy docs to gh-pages branch
29
30
command : gh-pages --dotfiles --message "doc(update) [skip ci]" --dist docs/_build/html
@@ -267,18 +268,11 @@ jobs:
267
268
build_docs :
268
269
docker :
269
270
- image : python:3.7.4
271
+ working_directory : /tmp/gh-pages
270
272
environment :
271
273
- FSLOUTPUTTYPE : NIFTI
272
274
- SUBJECTS_DIR : /tmp/subjects
273
275
steps :
274
- - restore_cache :
275
- keys :
276
- - docs-v1-{{ .Branch }}-{{ .Revision }}
277
- - docs-v1-{{ .Branch }}-
278
- - docs-v1-master
279
- - docs-v1-
280
- paths :
281
- - ./docs/_build/_html
282
276
- checkout
283
277
- run :
284
278
name : Create subjects folder
@@ -295,17 +289,26 @@ jobs:
295
289
- store_artifacts :
296
290
path : ./docs/_build/no_version_html
297
291
- run :
298
- name : Generate Versioned Docs
292
+ name : Stop or generate versioned docs?
299
293
command : |
300
294
set +e
301
295
force_versioned="$( git log --format=oneline -n 1 $CIRCLE_SHA1 | grep -i -E '\[docs?[ _]?versions?\]' )"
302
296
set -e
303
297
if [[ "x${CIRCLE_TAG}" = "x" && "${CIRCLE_BRANCH}" != "master" && "x${force_versioned}" = "x" ]]; then
304
298
echo "Not a tag or master branch - skipping versioned docs."
305
299
circleci step halt
306
- else
307
- make -f ./docs/Makefile versioned CURBRANCH=${CIRCLE_TAG:-$CIRCLE_BRANCH}
308
300
fi
301
+ - restore_cache :
302
+ keys :
303
+ - docs-v1-{{ .Branch }}-{{ .Revision }}
304
+ - docs-v1-{{ .Branch }}-
305
+ - docs-v1-master
306
+ - docs-v1-
307
+ paths :
308
+ - ./docs/_build/_html
309
+ - run :
310
+ name : Generate Versioned Docs
311
+ command : make -f ./docs/Makefile versioned CURBRANCH=${CIRCLE_TAG:-$CIRCLE_BRANCH}
309
312
- save_cache :
310
313
key : docs-v1-{{ .Branch }}-{{ .Revision }}
311
314
paths :
@@ -531,16 +534,16 @@ workflows:
531
534
tags :
532
535
only : /.*/
533
536
534
- # - deploy_docs_master:
535
- # requires:
536
- # - test_sdcflows
537
- # - test_package
538
- # - build_docs
539
- # filters:
540
- # branches:
541
- # only: /master/
542
- # tags:
543
- # ignore: /.*/
537
+ - deploy_docs_master :
538
+ requires :
539
+ - test_sdcflows
540
+ - test_package
541
+ - build_docs
542
+ filters :
543
+ branches :
544
+ only : /master/
545
+ tags :
546
+ ignore : /.*/
544
547
545
548
- deploy_docs_tag :
546
549
requires :
0 commit comments