From 41102e4937e92135533fda8fbe952acbe1635c1b Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 7 Aug 2024 10:48:55 -0700 Subject: [PATCH] adds ci --- .github/workflows/CI-api-docs.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/CI-api-docs.yml diff --git a/.github/workflows/CI-api-docs.yml b/.github/workflows/CI-api-docs.yml new file mode 100644 index 00000000..1de19cb5 --- /dev/null +++ b/.github/workflows/CI-api-docs.yml @@ -0,0 +1,41 @@ +name: apidocs +on: +- push + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install requirements for documentation generation + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install docutils pydoctor + + - name: Generate API documentation with pydoctor + run: | + # Run pydoctor build + pydoctor \ + --project-name=RunPod \ + --project-version=${{ github.ref_name }} \ + --project-url=https://github.com/$GITHUB_REPOSITORY \ + --html-viewsource-base=https://github.com/$GITHUB_REPOSITORY/tree/$GITHUB_SHA \ + --make-html \ + --html-output=./docs/api \ + --project-base-dir="." \ + --docformat=restructuredtext \ + --intersphinx=https://docs.python.org/3/objects.inv \ + ./runpod + + - name: Push API documentation to Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/api + commit_message: "Generate API documentation" \ No newline at end of file