26
.github/workflows/generate-docs.yml
vendored
26
.github/workflows/generate-docs.yml
vendored
@ -38,5 +38,29 @@ jobs:
|
|||||||
- name: Generate the docs
|
- name: Generate the docs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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 }}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class Client:
|
|||||||
class AuthenticatedClient(Client):
|
class AuthenticatedClient(Client):
|
||||||
"""A Client which has been authenticated for use on secured endpoints"""
|
"""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]:
|
def get_headers(self) -> Dict[str, str]:
|
||||||
"""Get headers to be used in authenticated endpoints"""
|
"""Get headers to be used in authenticated endpoints"""
|
||||||
|
Reference in New Issue
Block a user