Skip to content

Commit

Permalink
Add simple documentation (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Mar 23, 2023
1 parent 5d4d654 commit 0b69a62
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Documentation

on:
push:
branches:
- main

jobs:
documentation:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[docs]
- name: Create documentation
run: pdoc --html src/sleplet

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html/sleplet
publish_branch: gh-pages
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Template for python development

[![Documentation](https://github.com/astro-informatics/sleplet/actions/workflows/documentation.yml/badge.svg)](https://astro-informatics.github.io/sleplet)
[![tests](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml/badge.svg)](https://github.com/paddyroddy/python-template/actions/workflows/tests.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ optional-dependencies.dev = [
"pre-commit",
"tox",
]
optional-dependencies.docs = [
"pdoc3",
]
urls.homepage = "https://github.com/paddyroddy/python-template"

[tool.coverage]
Expand Down
3 changes: 3 additions & 0 deletions src/example/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
.. include:: ../../README.md
"""

0 comments on commit 0b69a62

Please sign in to comment.