forked from maltfield/rtd-github-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
environments > deployment branches and tags > no restriction
- Loading branch information
Showing
1 changed file
with
1 addition
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,5 @@ | ||
 | ||
|
||
# Continuous Documentation: Hosting Read the Docs on GitHub Pages | ||
|
||
This repo is a fork-ready base for your project's documentation. It lets you host a sphinx-generated site (with the Read the Docs theme) on GitHub Pages using GitHub Actions. | ||
|
||
|
||
<p align="center"> | ||
<a href="https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1/"><img src="docs/_static/sphinx-rtd-github-pages-1_featuredImage1.jpg?raw=true" alt="Continuous Documentation with Read the Docs on GitHub Pages using GitHub Actions"/></a> | ||
</p> | ||
 | ||
|
||
For more information, see this article: | ||
|
||
* https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1/ | ||
|
||
# How to use this repo | ||
|
||
1. Fork this repo | ||
1. On your forked repo, go to the "Actions" tab and click "I understand my workflows, go ahead and enable them" to enable GitHub workflows | ||
1. On your forked repo, go to the "Settings" tab. Under "GitHub Pages" choose 'gh-pages branch' under "Source" | ||
1. Make a small change to [docs/index.rst](/docs/index.rst) | ||
1. `git commit` and `git push` something to trigger your site to be built | ||
|
||
Every time you push to github.com on master, github will automatically spin up a container in their cloud to update your documentation. | ||
|
||
After you begin to edit the contents of the site, you'll probably also want to customize the following files: | ||
|
||
1. [docs/conf.py](/docs/conf.py) | ||
1. The python files in [src/](/src/) | ||
1. Other `.rst` files in [docs/](/docs) as needed | ||
|
||
For more details on how this works, see [Continuous Documentation: Hosting Read the Docs on GitHub Pages](https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1/) | ||
|
||
# Demo | ||
|
||
The GitHub-Pages-hosted "Hello World" example site built by this repo can be viewed here: | ||
|
||
* https://maltfield.github.io/rtd-github-pages/ | ||
|
||
## In the wild | ||
|
||
The following Githb-Pages-hosted Read the Docs sites have been created by cloning this repo: | ||
|
||
* [BusKill Docs](https://docs.buskill.in/buskill-app/en/stable/) ([repo](https://github.com/BusKill/buskill-app/tree/master/docs)) | ||
* [Python Bootcamp for Science](https://vienneae.github.io/rtd-github-pages/en/master/index.html) ([repo](https://github.com/vienneae/rtd-github-pages/tree/master/docs)) | ||
* [Py4Web Docs](https://nicozanf.github.io/py4web-doc/) ([repo](https://github.com/nicozanf/py4web-doc/tree/master/docs)) | ||
* [Hercules Docs](https://fovea1959.github.io/herc-docs-demo/en/master/index.html) ([repo](https://github.com/fovea1959/herc-docs-demo/)) | ||
|
||
# Local Iteration | ||
|
||
As shown above, you can simply push your changes to GitHub to update your sphinx documentation website. | ||
|
||
However, you can also build the site locally on your computer for faster iteration. | ||
|
||
## Linux | ||
|
||
To build the site on Debian Linux, first download some dependencies | ||
|
||
``` | ||
sudo apt-get update | ||
sudo apt-get -y install git firefox-esr python3-git python3-sphinx python3-sphinx-rtd-theme | ||
``` | ||
|
||
Change into the `docs` directory of this repo and build the sphinx site with `make` | ||
|
||
``` | ||
cd rtd-github-pages/docs/ | ||
make clean | ||
make html | ||
``` | ||
|
||
You can view the site (built into the `_build/html/` directory) using firefox | ||
|
||
``` | ||
firefox-esr _build/html/index.html | ||
``` | ||
|
||
# License | ||
|
||
The contents of this repo are dual-licensed. All code is GPLv3 and all other content is CC-BY-SA. |