How I Publish This Site

2024-Mar-24

I make use of the just tool to set up a kind of pipeline for publishing my wiki. This allows me to edit what I need to quickly in Vim, then publish to HTML and upload to the world-facing web-server in a single command: just wiki-push.

Here is my Justfile:

wiki-publish:
	vim ~/vimwiki/index.wiki -c VimwikiAll2HTML -c qa

wiki-push-wiki:
	cd ~/vimwiki && git add . && git commit -m "\"$(date)\"" && git push

wiki-move-html:
	cp -pr ~/vimwiki_html/*.html ~/vimwiki_html/blog ~/git/sr.ht/personal-site

personal-site-push:
	cd ~/git/sr.ht/personal-site && git add . && git commit -m "\"$(date)\"" && git push

personal-site-pull:
	ssh web 'cd /var/www/personal-site && git pull'

personal-site-overwrite:
	ssh web 'cd /var/www && cp -pr personal-site/*.html personal-site/blog html'

wiki-push:
	just wiki-push-wiki
	just wiki-publish
	just wiki-move-html
	just personal-site-push
	just personal-site-pull
	just personal-site-overwrite