Automate ghp-import installation

This commit is contained in:
Vitaly Potyarkin 2020-08-21 11:10:40 +03:00
commit fef531d8e8
2 changed files with 16 additions and 4 deletions

View file

@ -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)

View file

@ -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.