From fef531d8e8ff3e95cf3a900ff474d92df6b541bc Mon Sep 17 00:00:00 2001 From: Vitaly Potyarkin Date: Fri, 21 Aug 2020 11:10:40 +0300 Subject: [PATCH] Automate ghp-import installation --- Makefile | 11 +++++++---- README.md | 9 +++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6cbd98f..364025e 100644 --- a/Makefile +++ b/Makefile @@ -85,10 +85,6 @@ stopserver: | venv publish: | venv $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) -github: publish - ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) - git push origin $(GITHUB_PAGES_BRANCH) - .PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github @@ -103,3 +99,10 @@ Makefile.venv: && mv Makefile.fetched Makefile.venv VENVDIR:=$(abspath $(VENVDIR)) export PELICAN + +$(VENV)/ghp-import: + $(VENV)/pip install ghp-import + +github: submodule publish $(VENV)/ghp-import + $(VENV)/ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) + git push origin $(GITHUB_PAGES_BRANCH) diff --git a/README.md b/README.md index 9283ffa..18b060f 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,12 @@ This takes the Markdown files from the `content/` directory and generates static You can serve the generated site so it can be previewed in your browser: $ make serve + + +## Publish updated demo to GitHub pages + +The process is completely automated via Makefile recipe: + + $ make github + +Required tools will be installed into `.venv` if missing.