Infra: Use consistent 'make html' and 'make dirhtml' (#2968)

This commit is contained in:
Hugo van Kemenade 2023-01-19 16:39:28 +02:00 committed by GitHub
parent c582627501
commit 55ef1f44f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 8 deletions

View File

@ -28,7 +28,7 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
- name: 🔧 Render PEPs - name: 🔧 Render PEPs
run: make pages JOBS=$(nproc) run: make dirhtml JOBS=$(nproc)
# remove the .doctrees folder when building for deployment as it takes two thirds of disk space # remove the .doctrees folder when building for deployment as it takes two thirds of disk space
- name: 🔥 Clean up files - name: 🔥 Clean up files

View File

@ -6,14 +6,14 @@ JOBS=8
OUTPUT_DIR=build OUTPUT_DIR=build
RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS) -o $(OUTPUT_DIR) RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS) -o $(OUTPUT_DIR)
## render to render PEPs to "pep-NNNN.html" files ## html to render PEPs to "pep-NNNN.html" files
.PHONY: render .PHONY: html
render: venv html: venv
$(RENDER_COMMAND) $(RENDER_COMMAND)
## pages to render PEPs to "index.html" files within "pep-NNNN" directories ## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: pages .PHONY: dirhtml
pages: venv rss dirhtml: venv rss
$(RENDER_COMMAND) --build-dirs $(RENDER_COMMAND) --build-dirs
## fail-warning to render PEPs to "pep-NNNN.html" files and fail the Sphinx build on any warning ## fail-warning to render PEPs to "pep-NNNN.html" files and fail the Sphinx build on any warning
@ -71,6 +71,16 @@ spellcheck: venv
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit $(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell $(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell
## render (deprecated: use 'make html' alias instead)
.PHONY: render
render: html
@echo "\033[0;33mWarning:\033[0;31m 'make render' \033[0;33mis deprecated, use\033[0;32m 'make html' \033[0;33malias instead\033[0m"
## pages (deprecated: use 'make dirhtml' alias instead)
.PHONY: pages
pages: dirhtml
@echo "\033[0;33mWarning:\033[0;31m 'make pages' \033[0;33mis deprecated, use\033[0;32m 'make dirhtml' \033[0;33malias instead\033[0m"
.PHONY: help .PHONY: help
help : Makefile help : Makefile
@echo "Please use \`make <target>' where <target> is one of" @echo "Please use \`make <target>' where <target> is one of"

View File

@ -6,7 +6,7 @@ build:
python: "3.10" python: "3.10"
commands: commands:
- make pages JOBS=$(nproc) OUTPUT_DIR=_readthedocs/html - make dirhtml JOBS=$(nproc) OUTPUT_DIR=_readthedocs/html
sphinx: sphinx:
builder: dirhtml builder: dirhtml