make is a wonderful command line tool to perform repetitive actions which can be dependent on other actions to carry out a procedure such as compiling software or publishing a website.
make takes it's instructions from a file named (typically) Makefile
Here's an example Makefile which is also used to publish this website. I type make all and the magic just happens. So simple!
.PHONY: all build preview push
all: build push
build:
kiln generate --input ../conshell.net --output ./public
preview:
kiln serve ./public
push:
rsync -av --delete ./public/ rango:~/conshell.net/
See the make(1) man page for more details.