Add deploy task

This commit is contained in:
Starbeamrainbowlabs 2020-05-16 17:05:19 +01:00
parent 4254560b4a
commit 4076c79bef
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

11
build
View file

@ -19,6 +19,8 @@ config="./.eleventy.js"; # relative to src/
output_dir="${PWD}/public";
port_number="5726"
scp_path="starbeamrainbowlabs.com:/srv/pepperminty.wiki/www/";
###############################################################################
# Check out the lantern git submodule if needed
@ -41,6 +43,7 @@ if [[ "$#" -lt 1 ]]; then
echo -e " ${CACTION}server${RS} - Start a development busybox http server";
echo -e " ${CACTION}launch${RS} - Do both ${CACTION}server${RS} and ${CACTION}watch${RS}";
echo -e " ${CACTION}serve${RS} - Start a livereload server";
echo -e " ${CACTION}deploy${RS} - Build and deploy to the remote web server";
echo -e "";
exit 1;
@ -120,6 +123,14 @@ task_serve() {
task_end "$?";
}
task_deploy() {
tasks_run build;
task_begin "Deploying pepperminty.wiki";
scp -r ${output_dir}/* "${scp_path}";
task_end "$?";
}
###############################################################################
tasks_run "$@";