From 5b1c487ebd025b7d1eeccfca468faa7321fb906a Mon Sep 17 00:00:00 2001 From: Mohamed Nasser Date: Thu, 20 Jun 2024 14:57:43 +0300 Subject: [PATCH] Workflow to deploy mk-docs on gh-pages --- .github/workflows/documentation.yaml | 17 ++++++++++------- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index a12035f..21b1d0d 100755 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -23,15 +23,18 @@ jobs: with: python-version: '3.10' + - name: Install Poetry + uses: Gr1N/setup-poetry@v8 + with: + poetry-version: '1.8.3' + - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install -e .[tests,docs] + run: poetry install --extras "tests docs" - - name: Update Sphinx htmls + - name: Build MkDocs documentation run: | - make html - working-directory: docs + poetry run mkdocs build + working-directory: docs-mk - name: Publish to gh-pages uses: peaceiris/actions-gh-pages@v3 @@ -39,7 +42,7 @@ jobs: with: publish_branch: gh-pages # default: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html/ + publish_dir: docs-mk/site force_orphan: true - run: echo "Status of job = ${{ job.status }}." diff --git a/pyproject.toml b/pyproject.toml index 0e9a918..7ce1c7b 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,7 +114,6 @@ numpy = "^1.21.2" scipy = "^1.7.3" matplotlib = "^3.4.3" requests = "^2.32.3" -mkdocstrings = {extras = ["crystal", "python"], version = "^0.25.1"} [tool.poetry.group.dev.dependencies] flake8 = "^7.0.0" @@ -142,3 +141,4 @@ rstcheck = {extras = ["sphinx"], version = "^6.2.1"} mkdocs = "^1.6.0" mkdocs-material = {extras = ["imaging"], version = "^9.5.27"} mkdocs-gallery = "^0.10.1" +mkdocstrings = {extras = ["crystal", "python"], version = "^0.25.1"}