Skip to content

Commit

Permalink
chg: add gh workflow for sphinx build/deploy
Browse files Browse the repository at this point in the history
* cleanup docs config, remove dicey sphinx_git extension
* switch readme badge, download wheel artifacts to single directory

Signed-off-by: Stephen Arnold <[email protected]>
  • Loading branch information
sarnold committed Sep 10, 2024
1 parent 8d64c5f commit 4a38e78
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifacts

# note wheels should be in subdirectories named <artifact_name>
- name: Check number of downloaded artifacts
run: ls -l artifacts/*
run: ls -l artifacts/
49 changes: 49 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs
on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Add python requirements
run: |
python -m pip install --upgrade pip
pip install tox
- name: Install Ubuntu build deps
run: |
sudo apt-get -qq update
sudo apt-get install -y libre2-dev
- name: Build docs
run: |
tox -e ldocs,docs
- uses: actions/upload-artifact@v4
with:
name: ApiDocsHTML
path: "docs/_build/html/"

- name: set nojekyll for github
run: |
sudo touch docs/_build/html/.nojekyll
- name: Deploy docs to gh-pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_build/html/
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
:target: https://badge.fury.io/py/pyre2
:alt: Pypi version

.. image:: https://github.com/andreasvc/pyre2/workflows/Conda/badge.svg
:target: https://github.com/andreasvc/pyre2/actions?query=workflow:Conda
.. image:: https://github.com/andreasvc/pyre2/actions/workflows/conda-dev.yml/badge.svg
:target: https://github.com/andreasvc/pyre2/actions/workflows/conda-dev.yml
:alt: Conda CI Status

.. image:: https://img.shields.io/github/license/andreasvc/pyre2
Expand Down
2 changes: 0 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_git',
'sphinxcontrib.apidoc',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
Expand Down
7 changes: 0 additions & 7 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
Welcome to the Pyre2 documentation!
===================================

.. git_commit_detail::
:branch:
:commit:
:sha_length: 10
:uncommitted:
:untracked:

.. toctree::
:caption: Contents:
:maxdepth: 3
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ setup_requires =
[options.extras_require]
doc =
sphinx
sphinx_git
sphinx_rtd_theme
sphinxcontrib-apidoc

Expand Down

0 comments on commit 4a38e78

Please sign in to comment.