26
.github/workflows/generate-docs.yml
vendored
26
.github/workflows/generate-docs.yml
vendored
@ -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 }}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user