diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 61c06ce..86867d4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - name: Install Requirements run: | @@ -24,16 +22,8 @@ jobs: pip3 install -r requirements.txt sudo apt-get install doxygen - - name: Build Devel docs - run: | - git checkout master-exraildocdev - cd docs - make html - cd .. - - name: Build Prod docs run: | - git checkout master-exraildoc cd docs make html touch _build/html/.nojekyll diff --git a/docs/Makefile b/docs/Makefile index 0995db2..d4bb2cb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,15 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . -# BUILDDIR = _build - -# Determine build directory based on git branch -BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -ifeq ($(BRANCH),master-exraildocdev) - BUILDDIR = _build/html/devel -else - BUILDDIR = _build -endif +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index 48bb440..0000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,19 +0,0 @@ - -{% extends "!layout.html" %} - -{% block navigation %} - {{ super() }} -
-{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 089a66e..b1b3567 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,17 +5,10 @@ import os import subprocess -import sphinx.builders.html # Doxygen subprocess.call('doxygen DoxyfileEXRAIL', shell=True) -# Get current version/branch -try: - current_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('utf-8').strip() -except Exception as error: - current_branch = 'unknown' - # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -85,17 +78,7 @@ html_css_files = [ 'css/sphinx_design_overrides.css', ] -baseurl_prefix = 'https://dcc-ex.com/CommandStation-EX/' - -# Devel documentation needs to be a different directory -if current_branch == 'master-exraildocdev': - # For versioning - html_baseurl = f"{baseurl_prefix}devel/" - html_build_dir = os.path.abspath(os.path.join('_build', 'devel')) -else: - # Main landing page - html_baseurl = baseurl_prefix - html_build_dir = os.path.abspath('_build') +html_baseurl = 'https://dcc-ex.com/CommandStation-EX/' # Sphinx sitemap html_extra_path = [ diff --git a/docs/make.bat b/docs/make.bat index 577c8af..954237b 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -8,14 +8,7 @@ if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. -@REM set BUILDDIR=_build - -for /f "tokens=*" %%g in ('git rev-parse --abbrev-ref HEAD') do (set BRANCH=%%g) -if "%BRANCH%"=="master-exraildocdev" ( - set BUILDDIR=_build\html\devel -) else ( - set BUILDDIR=_build -) +set BUILDDIR=_build %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 (