Last active
January 3, 2022 03:44
-
-
Save ljcooke/2420d5e0b5ab12bcf0f2e7ca320b1f66 to your computer and use it in GitHub Desktop.
A script to revolutionise web3* using blockchain** (*update my website) (**bash)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
deploy() { | |
rsync -Pachvz --exclude '.DS_Store' \ | |
"${BUILD_DIR}/" "${REMOTE_HOST}:${REMOTE_PATH}/" "$@" | |
} | |
printf "\n== DRY RUN ==\n" | |
deploy --dry-run | |
printf "OK to deploy? [yN] " | |
read -r answer | |
if [ "$answer" = 'y' ]; then | |
deploy | |
else | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BUILD_DIR=build | |
REMOTE_HOST=example.com | |
REMOTE_PATH=/var/www/example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment