diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..d1e35a5 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,42 @@ +name: Deploy GitHub Pages + +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-20.04 + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + with: + context: . + submodules: true + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v2.2.1 + with: + context: . + python-version: 3.9 + - name: Install sphinx + run: | + pip install sphinx + pip install sphinx-wagtail-theme + - name: Build + run: | + cd docs/ + make clean + make html + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/2Aug2023' }} + with: + context: . + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e864704 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/build/ \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..df1968a --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx-wagtail-theme diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..3399734 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,14 @@ +# Configuration file for the Sphinx documentation builder. + +project = 'psm-tips' +copyright = '2024, See the AUTHORS file' +author = 'See the AUTHORS file' +release = '0.0.1' + +extensions = ['sphinx_wagtail_theme'] + +templates_path = ['_templates'] +exclude_patterns = [] + +html_theme = 'sphinx_wagtail_theme' +html_static_path = ['_static'] diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..95f5253 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,20 @@ +.. psm-tips documentation master file, created by + sphinx-quickstart on Sun Sep 8 12:26:50 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to psm-tips's documentation! +==================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search`