From d2877912d6056da7b139d8eca74d9a20695af595 Mon Sep 17 00:00:00 2001 From: greyes Date: Mon, 28 Oct 2024 20:19:02 +0100 Subject: [PATCH 1/6] Show some kind of version in the deployed gh-pages. #10 Added missing version variable for Sphinx --- doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/conf.py b/doc/conf.py index 05b2eeb..b488985 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,6 +14,7 @@ copyright = "2024 - present, NewTec GmbH" author = "NewTec GmbH" release = "1.1.0" +version = release # Do not differenciate between release and version conf_py_path = "/doc/" # with leading and trailing slashes # -- General configuration --------------------------------------------------- From 2d71cec96ef9525b54bd51cbc6918277f7400000 Mon Sep 17 00:00:00 2001 From: greyes Date: Mon, 28 Oct 2024 20:19:41 +0100 Subject: [PATCH 2/6] Fixed spacing according to PEP8 --- doc/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index b488985..723917b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -21,12 +21,12 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ - "sphinxcontrib.mermaid", # Mermaid diagrams - "sphinxcontrib.plantuml", # Plantuml diagrams - "myst_parser", # MyST markdown parser - "sphinx_rtd_dark_mode", # Dark mode - "sphinx_copybutton", # Copy button - "sphinx_togglebutton" # Toggle button + "sphinxcontrib.mermaid", # Mermaid diagrams + "sphinxcontrib.plantuml", # Plantuml diagrams + "myst_parser", # MyST markdown parser + "sphinx_rtd_dark_mode", # Dark mode + "sphinx_copybutton", # Copy button + "sphinx_togglebutton" # Toggle button ] templates_path = ["_templates"] From 5fb818bc6988ed8ed4caf68dfd44097a0e578269 Mon Sep 17 00:00:00 2001 From: greyes Date: Mon, 28 Oct 2024 20:20:06 +0100 Subject: [PATCH 3/6] Style external links with a marker. Show the user that the link is external --- doc/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 723917b..abfc0e3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -42,6 +42,9 @@ # HTML theme and static files html_theme = "sphinx_rtd_theme" html_last_updated_fmt = "%b %d, %Y" +html_theme_options = { + 'style_external_links': True +} html_static_path = ["_static"] html_css_files = [ From 8140ea69783eccd603f1221e622b7d1f0cf619d0 Mon Sep 17 00:00:00 2001 From: Gabryel Reyes Date: Tue, 29 Oct 2024 08:39:51 +0100 Subject: [PATCH 4/6] Use git version or commit instead of hard coded version --- doc/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index abfc0e3..92473bd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -6,6 +6,9 @@ import os.path import platform +import subprocess +git_version = subprocess.check_output( + ['git', 'describe', 'HEAD', '--tags', '--always']) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -13,8 +16,8 @@ project = "gitWorkInstructions" copyright = "2024 - present, NewTec GmbH" author = "NewTec GmbH" -release = "1.1.0" -version = release # Do not differenciate between release and version +release = git_version.decode() +version = release # Do not differenciate between release and version conf_py_path = "/doc/" # with leading and trailing slashes # -- General configuration --------------------------------------------------- From 1b916894e8a2f18dfc10f6146fe29b100ad49fcd Mon Sep 17 00:00:00 2001 From: Gabryel Reyes Date: Tue, 29 Oct 2024 08:40:22 +0100 Subject: [PATCH 5/6] Deploy on release --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b2823e7..33ee03f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -67,7 +67,7 @@ jobs: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: ${{ github.event_name == 'release' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} From f154f72696a4dfb0dbda9c2d51c18400470430c9 Mon Sep 17 00:00:00 2001 From: Gabryel Reyes Date: Tue, 29 Oct 2024 08:40:32 +0100 Subject: [PATCH 6/6] Fixed VSCode tasks --- .vscode/tasks.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 09a72af..d2e18b7 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -34,8 +34,8 @@ "type": "shell", "dependsOrder": "sequence", "dependsOn": [ - "Python Requirements", - "NPM Requirements" + "Install Python Requirements", + "Install NPM Requirements" ], "group": { "kind": "none"