From fe46e814ad937dbc7fd36bf34006dcc75569c63f Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Sun, 20 Jun 2021 19:05:40 +0300 Subject: [PATCH] Make docs build process less obscure --- .github/workflows/sphinx.yml | 6 +++--- Makefile | 2 +- docs/Makefile | 20 -------------------- docs/make.bat | 36 ------------------------------------ 4 files changed, 4 insertions(+), 60 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 033e974eff..6f6676fa8a 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -8,6 +8,7 @@ on: push: branches: - master + - main paths: - "docs/**" - ".github/workflows/sphinx.yml" @@ -35,11 +36,10 @@ jobs: - name: Build Documentation run: make docs - name: Extract Source Strings - if: github.ref == 'refs/heads/master' working-directory: docs run: | - make gettext - sphinx-intl update -p _build/gettext -l en + sphinx-build -M gettext ./ ./_build/ + sphinx-intl update -p ./_build/gettext -l en - name: Push Strings to Master if: github.ref == 'refs/heads/master' run: make git-commit diff --git a/Makefile b/Makefile index d43c717ffe..907aec71e3 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ dev-env: ## install libraries required to build docs and run tests @pip install -r requirements-dev.txt docs: ## build HTML documentation - make -C docs html + sphinx-build docs/ docs/_build/ git-commit: LOCAL_PATH?=. git-commit: GITHUB_SHA?=$(shell git rev-parse HEAD) diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index b413321ed7..0000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = docker-stacks -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 34fd4074df..0000000000 --- a/docs/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=docker-stacks - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/en/master/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd