diff --git a/.github/workflows/testing-and-deployment.yml b/.github/workflows/testing-and-deployment.yml
index eac10fd..21d91cf 100644
--- a/.github/workflows/testing-and-deployment.yml
+++ b/.github/workflows/testing-and-deployment.yml
@@ -1,4 +1,4 @@
-name: Build and upload
+name: CI/CD
on:
pull_request:
@@ -13,6 +13,36 @@ concurrency:
cancel-in-progress: true
jobs:
+ docs:
+ name: Build documentation
+ runs-on: ubuntu-latest
+
+ env:
+ PYANSYS_OFF_SCREEN: true
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+ cache: pip
+
+ - name: Install lsdyna-mesh-reader
+ run: pip install .[docs]
+
+ - name: Build Documentation
+ run: make -C docs html
+
+ - name: Deploy
+ uses: JamesIves/github-pages-deploy-action@v4
+ if: startsWith(github.ref, 'refs/tags/')
+ with:
+ branch: gh-pages
+ folder: docs/build/html
+ clean: true
+
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..8513dd6
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,28 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+SPHINXPROJ = lsdyna_mesh_reader
+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)
+ @if echo "$@" | grep -q "html"; then \
+ touch "$(BUILDDIR)"/html/.nojekyll; \
+ fi
+
+clean:
+ rm -rf $(BUILDDIR)/*
+ rm -rf examples/
+ find . -type d -name "_autosummary" -exec rm -rf {} +
diff --git a/docs/source/_static/pyvista_logo_sm.png b/docs/source/_static/pyvista_logo_sm.png
deleted file mode 100644
index a8715a6..0000000
Binary files a/docs/source/_static/pyvista_logo_sm.png and /dev/null differ
diff --git a/docs/source/conf.py b/docs/source/conf.py
index f2e73cf..bed4372 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -3,8 +3,8 @@
import datetime
import os
-import pyvista
-from sphinx_gallery.sorting import FileNameSortKey
+# import pyvista
+# from sphinx_gallery.sorting import FileNameSortKey
import lsdyna_mesh_reader
@@ -65,7 +65,7 @@
}
-html_static_path = ["_static"]
+# html_static_path = ["_static"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -106,26 +106,6 @@
# a list of builtin themes.
#
html_theme = "pydata_sphinx_theme"
-# html_context = {
-# # Enable the "Edit in GitHub link within the header of each page.
-# "display_github": True,
-# # Set the following variables to generate the resulting github URL for each page.
-# # Format Template: https://{{ github_host|default("github.com") }}/{{
-# # github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path
-# # }}{{ pagename }}{{ suffix }}
-# "github_user": "akaszynski",
-# "github_repo": "pymeshfix",
-# "github_version": "master/doc/",
-# "menu_links_name": "Getting Connected",
-# "menu_links": [
-# (' Slack Community', "http://slack.pyvista.org"),
-# (
-# ' Support',
-# "https://github.com/pyvista/pyvista-support",
-# ),
-# (' Source Code', "https://github.com/pyvista/pymeshfix"),
-# ],
-# }
html_theme_options = {
"show_prev_next": False,
diff --git a/pyproject.toml b/pyproject.toml
index f38c494..2ae7d2b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,6 +28,9 @@ readme = "README.md"
requires-python = ">=3.9"
version = "0.1.dev0"
+[project.optional-dependencies]
+docs = ["pydata-sphinx-theme", "numpydoc", "sphinx", "sphinx-copybutton", "myst-parser"]
+
[project.urls]
Repository = "https://github.com/akaszynski/lsdyna-mesh-reader"