Skip to content

Commit

Permalink
Fix documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Sep 19, 2023
1 parent 4655e1f commit 4832e58
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 103 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build Documentation

on:
pull_request:
push:
branches:
- master
Expand All @@ -10,26 +11,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
persist-credentials: false
# Standard drop-in approach that should work for most people.
- uses: ammaraskar/sphinx-action@master
python-version: 3.11
- uses: abatilo/actions-poetry@v2
- name: Install
run: |
poetry install
- name: Copy stubs
run: cp stubs/2.5.0/mobase-stubs/__init__.pyi docs/mobase.py
- name: Build
run: poetry run sphinx-build -b html docs/source docs/build
env:
PYTHONPATH: .
with:
pre-build-command: "apt-get update -y && apt-get install -y libgl1-mesa-glx && cp stubs/2.4.0/mobase.pyi docs/mobase.py"
docs-folder: "docs/"
PYTHONPATH: docs

- name: Install SSH Client 🔑
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Deploy 🚀
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
name: Deploy Documentation
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
SSH: true
REPOSITORY_NAME: ModOrganizer2/python-plugins-doc
BRANCH: master
FOLDER: docs/build/html
FOLDER: docs/build
11 changes: 3 additions & 8 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ on: [push, pull_request]
jobs:
checks:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.11]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.11
- uses: abatilo/actions-poetry@v2
- name: Install
run: |
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/pull_request.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Replace string
uses: frabert/replace-string-action@v1.1
id: version
Expand Down
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx-rtd-theme
sphinx-autodoc-typehints
sphinx-automodapi
PyQt5
PyQt6
12 changes: 2 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

sys.path.insert(0, os.path.abspath("../../stubs/2.4.0/"))


# -- Project information -----------------------------------------------------

project = "MO2 Python Plugin API"
copyright = "2020, Holt59"
copyright = "2023, Holt59"
author = "Holt59"

# The full version, including alpha/beta/rc tags
release = "2.3rc1"


# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -69,5 +61,5 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
html_extra_path = [".nojekyll"]
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ flake8-black = "^0.3.6"
flake8-pyproject = "^1.2.3"
types-pyyaml = "^6.0.12.11"


[tool.poetry.group.doc.dependencies]
sphinx-rtd-theme = "^1.3.0"
sphinx-autodoc-typehints = "^1.24.0"
sphinx-automodapi = "^0.16.0"
sphinx = "^7.2.6"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit 4832e58

Please sign in to comment.