Automatically deploy slide deck to starbeamrainbowlabs.com
Some checks are pending
continuous-integration/laminar-elessar Build failed with exit code 55 after 54 seconds
Some checks are pending
continuous-integration/laminar-elessar Build failed with exit code 55 after 54 seconds
This commit is contained in:
parent
1d8062008f
commit
23cfa8dfe9
1 changed files with 22 additions and 3 deletions
25
build
25
build
|
@ -18,6 +18,10 @@ lantern_path="./lantern-build-engine";
|
|||
# Put any custom settings here.
|
||||
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
|
||||
|
@ -139,15 +143,30 @@ task_ci() {
|
|||
|
||||
tasks_run setup;
|
||||
export NODE_ENV=production;
|
||||
tasks_run main archive;
|
||||
tasks_run main archive deploy;
|
||||
}
|
||||
|
||||
|
||||
task_archive() {
|
||||
task_begin "Archiving";
|
||||
mv "dist/" "Linux101/";
|
||||
mv "${build_output_folder}" "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 $?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue