Skip to content

b-branco/sphinx-to-github-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple project with a working pipeline for building and distributing sphinx documentation through GitHub Pages — mostly because I can't find an immediate use for this, and will 100% have forgotten how to do it by the time I do.

The workflow has the following steps:

  1. A push to the main branch (containing markdown source) triggers a sphinx HTML build.
  2. The HTML build is dropped to the gh-pages branch.
  3. The website, hosted by Pages, gets updated according to the new HTML content in gh-pages

The two main steps to set this up were:

  1. Set up ammaraskar's sphinx-action GitHub action in a yml file in .github/workflows. For a full example, see sphinx-action-test.
  2. On the Settings/Pages tab, set GitHub Pages to follow the gh-pages branch.

It's also possible to set up a custom domain for the website; I haven't got round to implementing this successfully (encountered issues with HTTPS validation), but it should involve creating A, AAAA and ALIAS records through the domain provider, as well as tinkering with the GitHub action to ensure a CNAME file containing the domain gets placed in the gh-pages branch.

About

Sample project for automating HTML sphinx build and distribution through GitHub Pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •