From f3988502ef50fba7458c498fbb71164680abca4d Mon Sep 17 00:00:00 2001 From: Adriano Di Luzio Date: Tue, 8 Feb 2022 11:50:04 +0100 Subject: [PATCH 1/2] Add CircleCI build step to generate docsets --- .circleci/config.yml | 20 ++++++++++++++++++++ docs/.gitignore | 1 + 2 files changed, 21 insertions(+) create mode 100644 docs/.gitignore diff --git a/.circleci/config.yml b/.circleci/config.yml index 01628de0..0b941ea8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ workflows: jobs: - unit-test - integration-test + - docset jobs: unit-test: @@ -22,3 +23,22 @@ jobs: steps: - checkout - run: make docker-test + docset: + docker: + # NOTE: We might eventually need Docker authentication here. + - image: cimg/python:3.9 + steps: + - checkout + - run: + # NOTE: We might add caching at `pip` level here. + command: | + pip install -r requirements.txt + cd docs + pip install -r requirements.txt + pip install sphinx sphinx_rtd_theme doc2dash + make html + doc2dash --name py-algo-sdk --index-page index.html --online-redirect-url https://py-algorand-sdk.readthedocs.io/en/latest/ _build/html + mv py-algo-sdk.docset /tmp + - store_artifacts: + path: /tmp/py-algo-sdk.docset + destination: py-algo-sdk.docset diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..d9dd1c5a --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +py-algo-sdk.docset From eb1e32ebbf3497a88c34599ba022555afda16520 Mon Sep 17 00:00:00 2001 From: Adriano Di Luzio Date: Tue, 8 Feb 2022 11:58:05 +0100 Subject: [PATCH 2/2] Upload a `tar.gz` artifact so it can be downloaded with one click --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b941ea8..3cf70366 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,7 +38,8 @@ jobs: pip install sphinx sphinx_rtd_theme doc2dash make html doc2dash --name py-algo-sdk --index-page index.html --online-redirect-url https://py-algorand-sdk.readthedocs.io/en/latest/ _build/html - mv py-algo-sdk.docset /tmp + tar -czvf py-algo-sdk.docset.tar.gz py-algo-sdk.docset + mv py-algo-sdk.docset.tar.gz /tmp - store_artifacts: - path: /tmp/py-algo-sdk.docset - destination: py-algo-sdk.docset + path: /tmp/py-algo-sdk.docset.tar.gz + destination: py-algo-sdk.docset.tar.gz