1
- docs_deploy : &docs
2
- docker :
3
- - image : node:8.10.0
4
- working_directory : /tmp/gh-pages
5
- steps :
6
- - run :
7
- name : Check whether this is the original repo
8
- command : |
9
- if [[ "$CIRCLE_PROJECT_USERNAME" != "nipreps" ]]; then
10
- echo "Not in nipreps/sdcflows - skipping docs deploy."
11
- circleci step halt
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 gh-pages tool
18
- command : |
19
- npm install -g --silent [email protected]
20
- - checkout
21
- - run :
22
- name : Set git settings
23
- command : |
24
- git config user.email "[email protected] "
25
- git config user.name "Documentation Push"
26
- - attach_workspace :
27
- at : docs/_build
28
- - run :
29
- name : Disable jekyll builds
30
- command : touch docs/_build/html/.nojekyll
31
- - run :
32
- name : Deploy docs to gh-pages branch
33
- command : gh-pages --dotfiles --message "doc(update) [skip ci]" --dist docs/_build/html
34
-
35
1
version : 2.1
36
2
orbs :
37
3
docker :
circleci/[email protected]
@@ -301,70 +267,6 @@ jobs:
301
267
- store_test_results :
302
268
path : /tmp/tests
303
269
304
- build_docs :
305
- docker :
306
- - image : cimg/python:3.9.16
307
- working_directory : /tmp/gh-pages
308
- environment :
309
- - FSLOUTPUTTYPE : NIFTI
310
- - SUBJECTS_DIR : /tmp/subjects
311
- steps :
312
- - checkout
313
- - run :
314
- name : Create subjects folder
315
- command : mkdir -p $SUBJECTS_DIR
316
- - run :
317
- name : Install Graphviz
318
- command : sudo apt-get update && sudo apt-get -y install --no-install-recommends graphviz
319
- - run :
320
- name : Install deps
321
- command : |
322
- pip install --no-cache-dir -r docs/requirements.txt
323
- pip install --no-cache-dir "setuptools_scm[toml]"
324
- python -m setuptools_scm
325
- - run :
326
- name : Build only this commit
327
- command : make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR=no_version_html html
328
- - store_artifacts :
329
- path : /home/circleci/docs/no_version_html
330
- destination : noversion
331
- - run :
332
- name : Stop or generate versioned docs?
333
- command : |
334
- set +e
335
- force_versioned="$( git log --format=oneline -n 1 $CIRCLE_SHA1 | grep -i -E '\[docs?[ _]?versions?\]' )"
336
- set -e
337
- if [[ "x${CIRCLE_TAG}" = "x" && "${CIRCLE_BRANCH}" != "master" && "x${force_versioned}" = "x" ]]; then
338
- echo "Not a tag or master branch - skipping versioned docs."
339
- circleci step halt
340
- fi
341
- - run :
342
- name : Clean-up nonversioned docs.
343
- command : make -C docs clean
344
- - restore_cache :
345
- keys :
346
- - docs-v2-{{ .Branch }}-{{ .Revision }}
347
- - docs-v2-{{ .Branch }}-
348
- - docs-v2-maint/1.3.x
349
- - docs-v2-
350
- paths :
351
- - ./docs/_build
352
- - run :
353
- name : Generate Versioned Docs
354
- command : |
355
- BRANCH=$( echo $CIRCLE_BRANCH | sed 's+/+_+g' )
356
- make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/docs" OUTDIR=${CIRCLE_TAG:-$BRANCH} html
357
- - save_cache :
358
- key : docs-v2-{{ .Branch }}-{{ .Revision }}
359
- paths :
360
- - ./docs/_build
361
- - persist_to_workspace :
362
- root : docs/_build
363
- paths : html
364
- - store_artifacts :
365
- path : ./docs/_build/html/html
366
- destination : versioned
367
-
368
270
deploy_docker :
369
271
machine :
370
272
image : ubuntu-2204:2022.10.2
@@ -460,9 +362,6 @@ jobs:
460
362
python3 -m twine check dist/*
461
363
python3 -m twine upload dist/* --non-interactive
462
364
463
- deploy_docs_tag :
464
- << : *docs
465
-
466
365
workflows :
467
366
version : 2
468
367
build_deploy :
@@ -503,7 +402,6 @@ workflows:
503
402
context :
504
403
- nipreps-common
505
404
requires :
506
- - build_docs
507
405
- test_package
508
406
- build_n_pytest
509
407
filters :
@@ -522,20 +420,3 @@ workflows:
522
420
ignore : /.*/
523
421
tags :
524
422
only : /.*/
525
-
526
- - build_docs :
527
- filters :
528
- branches :
529
- ignore :
530
- - /tests?\/.*/
531
- tags :
532
- only : /.*/
533
-
534
- - deploy_docs_tag :
535
- requires :
536
- - deploy_docker
537
- filters :
538
- branches :
539
- ignore : /.*/
540
- tags :
541
- only : /.*/
0 commit comments