From 3df16486dcba94d8625a2d014a23fff100a788aa Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Wed, 1 Nov 2023 21:32:33 +0400 Subject: [PATCH] Makefile for fmt --- Makefile | 30 ++++++++++++++++++++++++++++++ actions/latex/action.yml | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a7e1563 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +.DEFAULT_GOAL := help + +VENV :=.venv + +.PHONY: install +install: ## Install a virtual environment + python -m venv ${VENV} + ${VENV}/bin/pip install --upgrade pip + +.PHONY: fmt +fmt: install ## Run autoformatting and linting + ${VENV}/bin/pip install pre-commit + ${VENV}/bin/pre-commit install + ${VENV}/bin/pre-commit run --all-files + +.PHONY: build +build: install ## Build the book + ${VENV}/bin/pip install jupyter-book + ${VENV}/bin/jupyter-book clean book + ${VENV}/bin/jupyter-book build book + touch book/_build/html/.nojekyll + +.PHONY: clean +clean: ## Clean up caches and build artifacts + @git clean -X -d -f + +.PHONY: help +help: ## Display this help screen + @echo -e "\033[1mAvailable commands:\033[0m" + @grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort diff --git a/actions/latex/action.yml b/actions/latex/action.yml index 9351579..563a16f 100644 --- a/actions/latex/action.yml +++ b/actions/latex/action.yml @@ -37,7 +37,7 @@ on: type: string required: false default: 'draft' - + runs: using: "composite" steps: