diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index 69b6da1df..049f14dd2 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -38,5 +38,29 @@ jobs: - name: Generate the docs shell: bash run: | - pydoc3 -w kittycad + poetry run python -m pydoc -w \ + kittycad \ + kittycad.api \ + kittycad.models \ + kittycad.types \ + kittycad.client + mkdir -p docs/html + mv *.html docs/html/ + + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi) + + - name: Commit changes, if any + if: steps.git-check.outputs.modified == 'true' + run: | + git add . + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git + git commit -am "I HAVE GENERATED YOUR NEW DOCS!" || true + git fetch origin + git rebase origin/${{github.ref_name }} || true + git push origin ${{github.ref_name }} + diff --git a/kittycad/client.py b/kittycad/client.py index 603065679..3a7e3bd28 100644 --- a/kittycad/client.py +++ b/kittycad/client.py @@ -41,7 +41,7 @@ class Client: class AuthenticatedClient(Client): """A Client which has been authenticated for use on secured endpoints""" - token: str + token: str = attr.ib(kw_only=True) def get_headers(self) -> Dict[str, str]: """Get headers to be used in authenticated endpoints"""