From 94ee950b70d6e97f6ce2a3f93c96f904d276092e Mon Sep 17 00:00:00 2001 From: Qingzhuo Zhen Date: Fri, 27 May 2022 16:50:04 -0700 Subject: [PATCH] feat: add pdoc support --- .github/workflows/docs.yml | 25 +++++++++++++++++++++++++ .gitignore | 1 + src/amplitude_experiment/__init__.py | 5 ++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..510c347 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,25 @@ +name: Publish Docs + +on: workflow_dispatch + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v3 + + - name: Set up pdoc + run: pip install pdoc3 + + - name: Setup Docs + run: pdoc ./src/amplitude_experiment -o ./docs --html + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: docs/amplitude_experiment diff --git a/.gitignore b/.gitignore index 0b2f88a..988f4d2 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ instance/ # Sphinx documentation docs/_build/ +docs/amplitude_experiment # PyBuilder target/ diff --git a/src/amplitude_experiment/__init__.py b/src/amplitude_experiment/__init__.py index 173315a..324187f 100644 --- a/src/amplitude_experiment/__init__.py +++ b/src/amplitude_experiment/__init__.py @@ -1,4 +1,7 @@ -"""The official Amplitude Experiment Python Server SDK""" +""" +The official Amplitude Experiment Python Server SDK +.. include:: ../../README.md +""" from .client import Client from .config import Config