-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PMM-13597 Add doc-build-pdf make target
- Loading branch information
Showing
5 changed files
with
52 additions
and
51 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,19 +1,33 @@ | ||
doc-check-images: ## Check if all images are used in documentation | ||
@documentation/resources/bin/check-images.sh | ||
|
||
doc-remove-images: ## Remove unused images from documentation | ||
@ACTION=remove documentation/resources/bin/check-images.sh | ||
# Documentation Makefile. | ||
|
||
DOCDIR := documentation | ||
|
||
ifeq ($(shell basename $(CURDIR)),$(DOCDIR)) | ||
CONFIG_FILE := $(CURDIR)/mkdocs.yml | ||
DIR := $(CURDIR) | ||
else | ||
CONFIG_FILE := $(CURDIR)/$(DOCDIR)/mkdocs.yml | ||
DIR := $(CURDIR)/$(DOCDIR) | ||
endif | ||
|
||
doc-check-images: ## Check if all images are used in documentation | ||
@$(DIR)/resources/bin/check-images.sh | ||
|
||
doc-remove-images: ## Remove unused images from documentation | ||
@ACTION=remove $(DIR)/resources/bin/check-images.sh | ||
|
||
doc-build: ## Build documentation | ||
# This command is used to build and deploy a preview to onrender.com | ||
# Preview URL: https://pmm-doc.onrender.com | ||
|
||
mkdocs build -f $(CONFIG_FILE) | ||
mkdocs build -f $(DIR)/mkdocs.yml | ||
|
||
doc-build-pdf: ## Build documentation in PDF format | ||
# @docker buildx build --platform=linux/amd64 --progress=plain -t perconalab/pmm-doc-md:latest -f documentation/resources/Dockerfile.build . | ||
docker run --rm --platform=linux/amd64 -v $(DIR):/docs -w /build -e ENABLE_PDF_EXPORT=1 perconalab/pmm-doc-md:latest \ | ||
bash -c "cp -r /docs/* /build/ && \ | ||
ls -la /build && \ | ||
git init && \ | ||
git config user.email '[email protected]' && \ | ||
git add --all && \ | ||
git commit -am 'Initial commit' && \ | ||
mkdocs build -f mkdocs-pdf.yml && \ | ||
cp /build/site/pdf/*.pdf /docs/" |
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
This file was deleted.
Oops, something went wrong.
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
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