-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INFRA] Patch make files for doc build (#67)
* First pass at doc builder GHA * Scrub nilearn-specific infra * Update Make infra
- Loading branch information
Showing
5 changed files
with
124 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
# Workflow to build the documentation. | ||
name: Build docs | ||
name: Build documentation | ||
on: | ||
push: | ||
branches: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = -v | ||
SPHINXBUILD = sphinx-build | ||
BUILDDIR = _build | ||
|
||
# Internal variables | ||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) . | ||
|
||
.PHONY: help html dirhtml htmlhelp | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo " html to make standalone HTML files" | ||
@echo " dirhtml to make HTML files named index.html in directories" | ||
@echo " htmlhelp to make HTML files and a HTML help project" | ||
|
||
|
||
force_html: force html | ||
|
||
force: | ||
find . -name \*.rst -exec touch {} \; | ||
|
||
html: | ||
# These two lines make the build a bit more lengthy, and the | ||
# the embedding of images more robust | ||
rm -rf $(BUILDDIR)/html/_images | ||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html | ||
touch $(BUILDDIR)/html/.nojekyll | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
|
||
html-strict: | ||
# Build html documentation using a strict mode: Warnings are | ||
# considered as errors. | ||
make check | ||
touch $(BUILDDIR)/html/.nojekyll | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html." | ||
|
||
dirhtml: | ||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml | ||
touch $(BUILDDIR)/dirhtml .nojekyll | ||
@echo | ||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." | ||
|
||
htmlhelp: | ||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp | ||
@echo | ||
@echo "Build finished; now you can run HTML Help Workshop with the" \ | ||
".hhp project file in $(BUILDDIR)/htmlhelp." | ||
|
||
install: | ||
git clone --no-checkout --depth 1 https://github.com/Parietal-INRIA/fmralign.github.io.git build/fmralign.github.io | ||
touch build/fmralign.github.io/.nojekyll | ||
make html | ||
cd build/ && \ | ||
cp -r html/* fmralign.github.io && \ | ||
cd fmralign.github.io && \ | ||
git add * && \ | ||
git add .nojekyll && \ | ||
git commit -a -m 'Make install' && \ | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
REM Command file for Sphinx documentation | ||
|
||
set SPHINXBUILD=sphinx-build | ||
set SOURCEDIR=source | ||
set BUILDDIR=_build | ||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . | ||
|
||
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.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "help" ( | ||
:help | ||
echo.Please use `make ^<target^>` where ^<target^> is one of | ||
echo. html to make standalone HTML files | ||
echo. dirhtml to make HTML files named index.html in directories | ||
echo. htmlhelp to make HTML files and a HTML help project | ||
goto end | ||
) | ||
|
||
if "%1" == "html" ( | ||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html | ||
echo. | ||
echo.Build finished. The HTML pages are in %BUILDDIR%/html. | ||
goto end | ||
) | ||
|
||
if "%1" == "dirhtml" ( | ||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml | ||
echo. | ||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. | ||
goto end | ||
) | ||
|
||
if "%1" == "htmlhelp" ( | ||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp | ||
echo. | ||
echo.Build finished; now you can run HTML Help Workshop with the ^ | ||
.hhp project file in %BUILDDIR%/htmlhelp. | ||
goto end | ||
) | ||
|
||
:end | ||
popd |