Skip to content

Commit

Permalink
Merge pull request #15 from Nikronic/actions=doc
Browse files Browse the repository at this point in the history
add github action workflows for building docs
  • Loading branch information
Nikronic authored Sep 9, 2023
2 parents 1e4203f + c3527bb commit d010e72
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 70 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy static content to Pages

on:
pull_request:
types:
- closed

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-n-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if PR is from release branch to main
id: check-pr
run: |
if [[ ${{ github.event.pull_request.base.ref }} == "main" && ${{ github.event.pull_request.head.ref }} =~ ^release-v.*$ ]]; then
echo "PR is from a release branch to main."
echo "::set-output name=trigger_deploy::true"
else
echo "PR is not from a release branch to main."
echo "::set-output name=trigger_deploy::false"
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: install package and docs optional dependencies
run: pip install .[doc]
- name: build docs
run: cd docs && make html
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs/build/html'
- name: Deploy to GitHub Pages
if: steps.check-pr.outputs.trigger_deploy == 'true'
id: deployment
uses: actions/deploy-pages@v2
23 changes: 23 additions & 0 deletions .github/workflows/test-build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build Sphinx docs

on:
push:
pull_request:

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: install package and docs optional dependencies
run: pip install .[doc]
- name: Build docs
run: |
cd docs
make html
10 changes: 0 additions & 10 deletions docs/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme = 'furo'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
121 changes: 62 additions & 59 deletions env-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ dependencies:
- pycparser=2.21=pyhd8ed1ab_0
- pydot=1.4.2=py310hff52083_3
- pygit2=1.11.1=py310h5764c6d_0
- pygments=2.13.0=pyhd8ed1ab_0
- pygtrie=2.5.0=pyhd8ed1ab_0
- pyopenssl=22.1.0=pyhd8ed1ab_0
- pyparsing=2.4.7=pyhd8ed1ab_1
Expand Down Expand Up @@ -276,62 +275,66 @@ dependencies:
- zlib=1.2.13=h166bdaf_4
- zstd=1.5.2=h6239696_4
- pip:
- alabaster==0.7.12
- alembic==1.8.1
- anyio==3.6.2
- babel==2.11.0
- click==8.1.3
- cloudpickle==2.2.0
- databricks-cli==0.17.3
- deprecation==2.1.0
- docker==6.0.1
- docutils==0.17.1
- entrypoints==0.4
- fastapi==0.86.0
- flask==2.2.2
- greenlet==2.0.1
- gunicorn==20.1.0
- h11==0.14.0
- httptools==0.5.0
- imagesize==1.4.1
- importlib-metadata==5.0.0
- itsdangerous==2.1.2
- jinja2==3.1.2
- lxml==4.9.1
- mako==1.2.3
- markupsafe==2.1.1
- mlflow==1.30.0
- oauthlib==3.2.2
- pikepdf==6.2.3
- pillow==9.3.0
- prometheus-client==0.15.0
- prometheus-flask-exporter==0.21.0
- protobuf==4.21.9
- pydantic==1.10.2
- pyjwt==2.6.0
- python-dotenv==0.21.0
- querystring-parser==1.2.4
- smmap==5.0.0
- sniffio==1.3.0
- snowballstemmer==2.2.0
- sphinx==5.3.0
- sphinx-autodoc-typehints==1.19.5
- sphinx-copybutton==0.5.0
- sphinx-rtd-theme==1.1.1
- sphinxcontrib-applehelp==1.0.2
- sphinxcontrib-devhelp==1.0.2
- sphinxcontrib-htmlhelp==2.0.0
- sphinxcontrib-jsmath==1.0.1
- sphinxcontrib-qthelp==1.0.3
- sphinxcontrib-serializinghtml==1.1.5
- sqlalchemy==1.4.44
- sqlparse==0.4.3
- starlette==0.20.4
- uvicorn==0.19.0
- uvloop==0.17.0
- watchfiles==0.18.1
- websocket-client==1.4.2
- websockets==10.4
- werkzeug==2.2.2
- zipp==3.10.0
- alabaster==0.7.12
- alembic==1.8.1
- anyio==3.6.2
- babel==2.11.0
- beautifulsoup4==4.12.2
- click==8.1.3
- cloudpickle==2.2.0
- databricks-cli==0.17.3
- deprecation==2.1.0
- docker==6.0.1
- docutils==0.20.1
- entrypoints==0.4
- fastapi==0.86.0
- flask==2.2.2
- furo==2023.8.19
- greenlet==2.0.1
- gunicorn==20.1.0
- h11==0.14.0
- httptools==0.5.0
- imagesize==1.4.1
- importlib-metadata==5.0.0
- itsdangerous==2.1.2
- jinja2==3.1.2
- lxml==4.9.1
- mako==1.2.3
- markupsafe==2.1.1
- mlflow==1.30.0
- oauthlib==3.2.2
- pikepdf==6.2.3
- pillow==9.3.0
- prometheus-client==0.15.0
- prometheus-flask-exporter==0.21.0
- protobuf==4.21.9
- pydantic==1.10.2
- pygments==2.16.1
- pyjwt==2.6.0
- python-dotenv==0.21.0
- querystring-parser==1.2.4
- smmap==5.0.0
- sniffio==1.3.0
- snowballstemmer==2.2.0
- soupsieve==2.5
- sphinx==7.2.5
- sphinx-autodoc-typehints==1.24.0
- sphinx-basic-ng==1.0.0b2
- sphinx-copybutton==0.5.2
- sphinxcontrib-applehelp==1.0.2
- sphinxcontrib-devhelp==1.0.2
- sphinxcontrib-htmlhelp==2.0.0
- sphinxcontrib-jsmath==1.0.1
- sphinxcontrib-qthelp==1.0.3
- sphinxcontrib-serializinghtml==1.1.9
- sqlalchemy==1.4.44
- sqlparse==0.4.3
- starlette==0.20.4
- uvicorn==0.19.0
- uvloop==0.17.0
- watchfiles==0.18.1
- websocket-client==1.4.2
- websockets==10.4
- werkzeug==2.2.2
- zipp==3.10.0
prefix: /home/nik/anaconda3/envs/niklib-cpu

0 comments on commit d010e72

Please sign in to comment.