Skip to content

Commit

Permalink
Merge pull request #47 from deshima-dev/#46-readme-to-docs
Browse files Browse the repository at this point in the history
Use README.md as a top page of the docs
  • Loading branch information
astropenguin authored Sep 16, 2020
2 parents b1f10fe + 149420a commit 4ef3ca3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ on:

jobs:
job:
name: GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Build docs
- name: Install dependencies
run: |
sudo apt install pandoc
pip install poetry
poetry install
poetry run etc/builddocs
- name: Build docs
run: poetry run etc/builddocs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
publish_branch: gh-pages
force_orphan: true
force_orphan: true
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
![DESHIMA logo](http://deshima.ewi.tudelft.nl/image/deshima_logo.png)

# deshima-sensitivity

[![PyPI](https://img.shields.io/pypi/v/deshima-sensitivity.svg?label=PyPI&style=flat-square)](https://pypi.org/pypi/deshima-sensitivity/)
Expand Down
12 changes: 2 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
Welcome to deshima-sensitivity's documentation!
===============================================
.. include:: readme.rst

.. toctree::
:hidden:

Home <self>
Package guide <_apidoc/modules>

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Package guide <_apidoc/deshima_sensitivity>
14 changes: 11 additions & 3 deletions etc/builddocs
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash
set -eu

sphinx-apidoc -f -o docs/_apidoc deshima_sensitivity
sphinx-build docs docs/_build
sphinx-build docs docs/_build

# convert README.md to readme.rst
pandoc --column 500 -f markdown -t rst -o docs/readme.rst README.md


# auto-generate package guide
sphinx-apidoc -efT -o docs/_apidoc deshima_sensitivity


# build website
sphinx-build -a docs docs/_build

0 comments on commit 4ef3ca3

Please sign in to comment.