Skip to content

Commit e7a85eb

Browse files
Merge pull request deriv-com#3 from sasikala-binary/gh-page/generate
gh-page generate minor tuning
2 parents b40fca1 + f9630d9 commit e7a85eb

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

.circleci/config.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
version: 2
22
jobs:
3-
build:
3+
test:
44
docker:
55
- image: circleci/python:3.9.6
66
environment: # environment variables for primary container
77
PIPENV_VENV_IN_PROJECT: true
88
steps: # steps that comprise the `build` job
9+
- add_ssh_keys:
10+
fingerprints:
11+
- "c8:f7:fc:a0:0d:2c:43:93:e3:c7:b6:cf:16:93:98:e1"
912
- checkout # check out source code to working directory
1013
- run: sudo chown -R circleci:circleci /usr/local/bin
1114
- restore_cache:
@@ -24,3 +27,38 @@ jobs:
2427
- run:
2528
command: |
2629
make coverage
30+
docs-build-deploy:
31+
docker:
32+
- image: circleci/python:3.9.6
33+
environment: # environment variables for primary container
34+
PIPENV_VENV_IN_PROJECT: true
35+
steps:
36+
- add_ssh_keys:
37+
fingerprints:
38+
- "c8:f7:fc:a0:0d:2c:43:93:e3:c7:b6:cf:16:93:98:e1"
39+
- checkout
40+
- run: sudo chown -R circleci:circleci /usr/local/bin
41+
- restore_cache:
42+
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
43+
- run:
44+
command: |
45+
make setup
46+
- save_cache:
47+
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
48+
paths:
49+
- "venv"
50+
- run:
51+
command: |
52+
git config --local user.email "sysadmin@binary.com"
53+
git config --local user.name "gh-pages deploy bot"
54+
make gh-pages
55+
workflows:
56+
version: 2
57+
build:
58+
jobs:
59+
- test
60+
- docs-build-deploy:
61+
filters:
62+
branches:
63+
only:
64+
- master

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ setup:
55
test:
66
pipenv run python setup.py pytest
77
doc:
8-
pdoc deriv_api --force --html -o docs/html --template-dir docs/templates
9-
gh-pages:
10-
pdoc deriv_api --force --html -o /tmp/python-deriv-api-docs --template-dir docs/templates && git add . && git stash && git checkout gh-pages && cp -r /tmp/python-deriv-api-docs/deriv_api/* . && git add . && git commit -m 'Update docs' && git push && git checkout -
8+
pipenv run pdoc deriv_api --force --html -o docs/html --template-dir docs/templates
119
build:
1210
pip3 install build && python3 -m build
1311
coverage:
1412
pipenv run coverage run --source deriv_api -m pytest && pipenv run coverage report -m
13+
gh-pages:
14+
pipenv run pdoc deriv_api --force --html -o /tmp/python-deriv-api-docs --template-dir docs/templates && git add -A . && git stash && git checkout gh-pages && cp -r /tmp/python-deriv-api-docs/deriv_api/* . && git add -A . && git commit -m 'Update docs' && git push origin gh-pages && git checkout -

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If you pass the connection it's up to you to reconnect in case the connection dr
6060
#### API reference
6161
The complete API reference is hosted [here](https://binary-com.github.io/python-deriv-api/)
6262

63-
Examples [here](https://github.com/binary-com/python-deriv-api/examples)
63+
Examples [here](https://github.com/binary-com/python-deriv-api/tree/master/examples)
6464

6565
# Development
6666
```

0 commit comments

Comments
 (0)