mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-26 18:46:04 +01:00
Revert to single version
This commit is contained in:
parent
6512aa5b1b
commit
c993f5a4a9
10
.github/workflows/docs.yml
vendored
10
.github/workflows/docs.yml
vendored
@ -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
|
||||
|
@ -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:
|
||||
|
19
docs/_templates/layout.html
vendored
19
docs/_templates/layout.html
vendored
@ -1,19 +0,0 @@
|
||||
<!-- _templates/layout.html -->
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ super() }}
|
||||
<div class="sidebar-versions">
|
||||
<div class="version-wrapper">
|
||||
<label for="version-switch">Documentation Version:</label>
|
||||
<select id="version-switch" onchange="window.location.href=this.value">
|
||||
<option value="/CommandStation-EX/"{% if version == "main" %} selected{% endif %}>
|
||||
Production
|
||||
</option>
|
||||
<option value="/CommandStation-EX/devel/html/"{% if version == "devel" %} selected{% endif %}>
|
||||
Development
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
19
docs/conf.py
19
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 = [
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user