Skip to content

Commit

Permalink
Change sphinx to pdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
arxyzan committed Aug 17, 2023
1 parent 79e0456 commit bd8302f
Show file tree
Hide file tree
Showing 45 changed files with 42 additions and 1,230 deletions.
59 changes: 42 additions & 17 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
name: Deploy Sphinx docs
on: [push, pull_request, workflow_dispatch]
name: Publish docs

# build the documentation whenever there are new commits on main
on:
push:
branches:
- main
# Alternative: only build for tags.
# tags:
# - '*'

# security: restrict permissions for CI jobs.
permissions:
contents: write
contents: read

jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme furo sphinx_copybutton docutils sphinx_inline_tabs sphinx_removed_in
- name: Sphinx build
run: |
sphinx-build -b html docs/source/ docs/build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- uses: actions/setup-python@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: true
python-version: '3.9'

# ADJUST THIS: install all dependencies (including pdoc)
- run: pip install pdoc
# ADJUST THIS: build your documentation into docs/.
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here.
- run: pdoc -o docs/source

- uses: actions/upload-pages-artifact@v2
with:
path: docs/source

# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v2
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

3 changes: 0 additions & 3 deletions docs/requirements.txt

This file was deleted.

35 changes: 0 additions & 35 deletions docs/source/conf.py

This file was deleted.

45 changes: 0 additions & 45 deletions docs/source/hezar.data.datasets.rst

This file was deleted.

29 changes: 0 additions & 29 deletions docs/source/hezar.data.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs/source/hezar.embeddings.rst

This file was deleted.

45 changes: 0 additions & 45 deletions docs/source/hezar.metrics.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/hezar.models.audio_classification.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/hezar.models.image2text.crnn.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/source/hezar.models.image2text.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/hezar.models.image2text.trocr.rst

This file was deleted.

Loading

0 comments on commit bd8302f

Please sign in to comment.