publish: Moved deploy logic to shell script. Great Job™

generated from commit d884a5ef2a81aeca0e7f7c5d9167046d48e8fb8d