a blog by Marius Gedminas

Posts tagged Github

Switching to GitHub Actions

I am grateful to Travis CI for providing many years of free CI service to all of my FOSS projects. However the free lunch is over and I don’t want to constantly ask for free build credits by email (the first 10,000 ran out in 10 days). I’ve chosen to migrate to GitHub Actions. There are already helpful resources about this: Python in GitHub Actions by Hynek Schlawack The GitHub workflow template used by Zope Foundation projects The official documentation In fact part of the difficulty with the migration is that there’s too much documentation available!

Adding "Edit on GitHub" links to Sphinx pages

Documentation pages on ReadTheDocs have a nice sidebar with extra "Show on GitHub" and "Edit on GitHub" links. Here's how you can have those for your own Sphinx documentation: Create _ext and _templates subdirectories. Create a file _ext/edit_on_github.py that hooks into html-page-context to add a couple of template variables. Create a file _templates/sourcelink.html that uses those two variables to insert "Show on GitHub" and "Edit on GitHub" links in the sidebar.