Skip to content

Commit

Permalink
Add pdoc docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cmalinmayor committed Feb 23, 2024
1 parent d356ee2 commit b7e1eb0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 13 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docs build

# build the documentation whenever there are new commits on main
on:
push:
branches:
- main

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

jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install -e .[dev]
- run: pdoc -o docs/ -d google src/motile_toolbox
- uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Deploy the artifact to GitHub pages.
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@v4
17 changes: 5 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
# Pdoc documentation
docs/

# PyBuilder
target/
Expand Down Expand Up @@ -110,16 +110,6 @@ ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
Expand All @@ -129,3 +119,6 @@ dmypy.json
.pyre/
pyrepo
.vscode/

# OS Files
.DS_Store
2 changes: 1 addition & 1 deletion src/motile_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
.. include ../../README.md
.. include:: ../../README.md
"""

0 comments on commit b7e1eb0

Please sign in to comment.