devilbox/docs/Makefile

69 lines
2.0 KiB
Makefile
Raw Normal View History

2019-12-01 13:14:00 +01:00
ifneq (,)
.error This Makefile requires GNU Make.
endif
2018-06-30 17:36:11 +02:00
2019-12-01 13:14:00 +01:00
# -------------------------------------------------------------------------------------------------
# Default configuration
# -------------------------------------------------------------------------------------------------
.PHONY: help build autobuild linkcheck linkcheck2
2018-06-30 17:36:11 +02:00
2019-12-01 13:14:00 +01:00
# -------------------------------------------------------------------------------------------------
# Default Target
# -------------------------------------------------------------------------------------------------
2018-06-30 17:36:11 +02:00
2019-12-01 13:14:00 +01:00
help:
@echo "build Build and test documentation"
@echo "autobuild Continuously run and build (http://0.0.0.0:8000)"
@echo "linkcheck Sphinx linkcheck"
@echo "linkcheck2 Custom linkcheck"
2018-06-30 17:36:11 +02:00
2019-12-01 13:14:00 +01:00
# -------------------------------------------------------------------------------------------------
# Target
# -------------------------------------------------------------------------------------------------
2018-06-30 17:36:11 +02:00
2018-07-25 08:56:45 +02:00
linkcheck2:
2020-03-24 12:06:32 +01:00
docker run \
--rm \
$$(tty -s && echo "-it" || echo) \
-v $(PWD):/data \
2022-01-24 15:23:41 +01:00
cytopia/linkcheck -l -k -r 60 -t 30 -e rst -c '200,204,403' _includes/
2018-06-30 17:36:11 +02:00
2019-12-01 13:14:00 +01:00
linkcheck:
docker run \
--rm \
$$(tty -s && echo "-it" || echo) \
-e SPHINX_PROJECT="docs" \
-e SPHINX_PORT=8000 \
-e NEW_UID="$$(id -u)" \
-e NEW_GID="$$(id -g)" \
-v $(PWD)/..:/shared/httpd \
devilbox/python-sphinx:3.8-dev \
sphinx-build -M linkcheck . _build
2018-06-30 17:36:11 +02:00
build:
2019-12-01 13:14:00 +01:00
docker run \
--rm \
$$(tty -s && echo "-it" || echo) \
-e SPHINX_PROJECT="docs" \
-e SPHINX_PORT=8000 \
-e NEW_UID="$$(id -u)" \
-e NEW_GID="$$(id -g)" \
-v $(PWD)/..:/shared/httpd \
devilbox/python-sphinx:3.8-dev \
sphinx-build -a -E -n -j auto -W . _build/html
2018-06-30 17:36:11 +02:00
autobuild:
2019-12-01 13:14:00 +01:00
docker run \
--rm \
$$(tty -s && echo "-it" || echo) \
-e SPHINX_PROJECT="docs" \
-e SPHINX_PORT=8000 \
-e NEW_UID="$$(id -u)" \
-e NEW_GID="$$(id -g)" \
-p "8000:8000" \
-v $(PWD)/..:/shared/httpd \
devilbox/python-sphinx:3.8-dev \
2021-05-17 20:53:53 +02:00
sphinx-autobuild -a -E -n -j auto -W --host 0.0.0.0 --port 8000 . _build/html