diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index c825d513803..20cee1dc724 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -33,10 +33,11 @@ jobs: with: python-version: "3.12" + - name: Install UV + uses: astral-sh/setup-uv@v8.0.0 + - name: Install pymatgen with docs dependencies - run: | - pip install -e ".[docs]" - pip install sphinx sphinx-rtd-theme sphinx_markdown_builder + run: uv sync --group docs - name: Generate Sphinx API docs working-directory: docs @@ -49,12 +50,14 @@ jobs: rsync -a ../pymatgen-core/src/pymatgen/ "$MERGED/" rsync -a ../src/pymatgen/ "$MERGED/" echo ".. This file is required as the Sphinx master_doc entry point. Content is generated by sphinx-apidoc." > apidoc/index.rst - sphinx-apidoc --implicit-namespaces -M -d 7 -o apidoc -f "$MERGED" - sphinx-build -b html apidoc html + uv run sphinx-apidoc --implicit-namespaces -M -d 7 -o apidoc -f "$MERGED" + uv run sphinx-build -b html apidoc html rm -rf .apidoc_merge rm apidoc/*.rst mv html/pymatgen*.html . mv html/modules.html . + cp -r html/_static _static + touch .nojekyll - name: Setup Pages uses: actions/configure-pages@v5 diff --git a/docs/_config.yml b/docs/_config.yml index 27f05bb5993..f34bb84c536 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -31,4 +31,7 @@ search_enabled: true search.heading_level: 6 kramdown: - toc_levels: 1..3 \ No newline at end of file + toc_levels: 1..3 + +include: + - _static \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6dd91cf6623..5df037d20d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -281,8 +281,7 @@ reportInvalidTypeForm = false exclude = ["**/tests"] [tool.uv] -# TODO: remove `docs` once doc generation is automated -default-groups = ["dev", "test", "lint", "docs"] +default-groups = ["dev", "test", "lint"] [dependency-groups] dev = [