Skip to content

Commit 9c64874

Browse files
authored
Merge pull request #39 from QuLogic/add-ghp
Add gh-pages deployment
2 parents 091def4 + 98fe4ec commit 9c64874

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

.circleci/config.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,57 @@
1+
---
12
version: 2.1
23

34
orbs:
4-
python: circleci/python@0.2.1
5+
python: circleci/python@1.2.1
56

67
jobs:
78
build_docs:
89
executor: python/default
910
steps:
1011
- checkout
11-
- python/install-deps
12-
- run:
13-
name: install theme
14-
command: python -m pip install --user -ve .
12+
- python/install-packages:
13+
pkg-manager: pip-dist
14+
pip-dependency-file: docs/requirements.txt
1515
- run:
1616
name: Build docs
17-
command: cd docs/ && make html
17+
command: make -C docs html
1818
- persist_to_workspace:
1919
root: docs/_build/html
2020
paths: .
2121
- store_artifacts:
2222
path: docs/_build/html/
2323

24+
deploy:
25+
docker:
26+
- image: "node:8.10.0"
27+
steps:
28+
- attach_workspace:
29+
at: html
30+
- run:
31+
name: Install and configure dependencies
32+
command: |
33+
npm install -g --silent gh-pages@2.0.1
34+
git config user.email "MatplotlibCircleBot@nomail"
35+
git config user.name "MatplotlibCircleBot"
36+
- add_ssh_keys:
37+
fingerprints:
38+
- "25:2e:77:93:7e:0e:af:77:b0:be:e7:fe:86:2c:5b:96"
39+
- run:
40+
name: "Deploy new docs"
41+
command: |
42+
touch html/.nojekyll # Disable jekyll builds on GitHub.
43+
gh-pages \
44+
--dotfiles \
45+
--message "[skip ci] Doc build of $CIRCLE_SHA1" \
46+
--dist html
2447
2548
workflows:
2649
main:
2750
jobs:
2851
- build_docs
52+
- deploy:
53+
requires:
54+
- build_docs
55+
filters:
56+
branches:
57+
only: main

0 commit comments

Comments
 (0)