mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-15 22:12:57 +00:00
Make docs build process less obscure
This commit is contained in:
6
.github/workflows/sphinx.yml
vendored
6
.github/workflows/sphinx.yml
vendored
@@ -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
|
||||
|
2
Makefile
2
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)
|
||||
|
@@ -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)
|
@@ -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
|
Reference in New Issue
Block a user