Automatically deploy slide deck to starbeamrainbowlabs.com
Some checks are pending
continuous-integration/laminar-elessar Build failed with exit code 55 after 54 seconds

This commit is contained in:
Starbeamrainbowlabs 2019-03-12 21:01:16 +00:00
parent 1d8062008f
commit 23cfa8dfe9
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

25
build
View file

@ -18,6 +18,10 @@ lantern_path="./lantern-build-engine";
# Put any custom settings here. # Put any custom settings here.
build_output_folder="./dist"; build_output_folder="./dist";
deploy_ssh_user="ci";
deploy_ssh_host="starbeamrainbowlabs.com";
deploy_ssh_port="2403";
############################################################################### ###############################################################################
# Check out the lantern git submodule if needed # Check out the lantern git submodule if needed
@ -139,15 +143,30 @@ task_ci() {
tasks_run setup; tasks_run setup;
export NODE_ENV=production; export NODE_ENV=production;
tasks_run main archive; tasks_run main archive deploy;
} }
task_archive() { task_archive() {
task_begin "Archiving"; task_begin "Archiving";
mv "dist/" "Linux101/"; mv "${build_output_folder}" "Linux101/";
tar cafv "${ARCHIVE}/slides.tar.bz2" "Linux101/"; tar cafv "${ARCHIVE}/slides.tar.bz2" "Linux101/";
mv "Linux101/" "dist/"; exit_code=$?;
mv "Linux101/" "${build_output_folder}";
task_end "${exit_code}";
}
task_deploy() {
task_begin "Deploying to starbeamrainbowlabs.com....";
if [ "${SSH_KEY_PATH}" == "" ]; then
task_end 1 "Error: Can't find the SSH key as the environment variable SSH_KEY_PATH isn't set.";
fi
sftp -i "${SSH_KEY_PATH}" -P "${deploy_ssh_port}" -o PasswordAuthentication=no "${deploy_ssh_user}@${deploy_ssh_host}" << SFTPCOMMANDS
put -r ${build_output_folder} Linux101/;
bye;
SFTPCOMMANDS
task_end $?; task_end $?;
} }