Skip to content

Commit 4a38e78

Browse files
committed
chg: add gh workflow for sphinx build/deploy
* cleanup docs config, remove dicey sphinx_git extension * switch readme badge, download wheel artifacts to single directory Signed-off-by: Stephen Arnold <[email protected]>
1 parent 8d64c5f commit 4a38e78

File tree

6 files changed

+53
-13
lines changed

6 files changed

+53
-13
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ jobs:
106106
steps:
107107
- uses: actions/download-artifact@v4
108108
with:
109+
merge-multiple: true
109110
path: artifacts
110111

111112
# note wheels should be in subdirectories named <artifact_name>
112113
- name: Check number of downloaded artifacts
113-
run: ls -l artifacts/*
114+
run: ls -l artifacts/

.github/workflows/sphinx.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docs
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-22.04
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.9'
21+
22+
- name: Add python requirements
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install tox
26+
27+
- name: Install Ubuntu build deps
28+
run: |
29+
sudo apt-get -qq update
30+
sudo apt-get install -y libre2-dev
31+
32+
- name: Build docs
33+
run: |
34+
tox -e ldocs,docs
35+
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: ApiDocsHTML
39+
path: "docs/_build/html/"
40+
41+
- name: set nojekyll for github
42+
run: |
43+
sudo touch docs/_build/html/.nojekyll
44+
45+
- name: Deploy docs to gh-pages
46+
if: ${{ github.event_name == 'push' }}
47+
uses: JamesIves/github-pages-deploy-action@v4
48+
with:
49+
folder: docs/_build/html/

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
:target: https://badge.fury.io/py/pyre2
1919
:alt: Pypi version
2020

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

2525
.. image:: https://img.shields.io/github/license/andreasvc/pyre2

docs/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4343
# ones.
4444
extensions = [
45-
'sphinx_git',
4645
'sphinxcontrib.apidoc',
47-
'sphinx.ext.autodoc',
4846
'sphinx.ext.doctest',
4947
'sphinx.ext.intersphinx',
5048
'sphinx.ext.todo',

docs/source/index.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
Welcome to the Pyre2 documentation!
22
===================================
33

4-
.. git_commit_detail::
5-
:branch:
6-
:commit:
7-
:sha_length: 10
8-
:uncommitted:
9-
:untracked:
10-
114
.. toctree::
125
:caption: Contents:
136
:maxdepth: 3

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ setup_requires =
2727
[options.extras_require]
2828
doc =
2929
sphinx
30-
sphinx_git
3130
sphinx_rtd_theme
3231
sphinxcontrib-apidoc
3332

0 commit comments

Comments
 (0)