Add deploy task

Cette révision appartient à :
Starbeamrainbowlabs 2020-05-16 17:05:19 +01:00
Parent 4254560b4a
révision 4076c79bef
Signé par: sbrl
ID de la clé GPG: 1BE5172E637709C2
1 fichiers modifiés avec 11 ajouts et 0 suppressions

11
build
Voir le fichier

@ -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 "$@";