Created
March 29, 2020 14:41
-
-
Save idbmb/0fce34741af463bbc1adc83a71991d1d to your computer and use it in GitHub Desktop.
Memudahkan Deploy Hugo
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
#!/bin/bash | |
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m" | |
# Generate file statis | |
hugo # if using a theme, replace by `hugo -t <yourtheme>` | |
# pindah ke direktori render | |
cd idbmb.github.io | |
# tambahkan perubahan ke Git | |
git add -A | |
# Buat sebuah commit baru | |
msg="rebuilding site `date`" | |
if [ $# -eq 1 ] | |
then msg="$1" | |
fi | |
git commit -m "$msg" | |
# Push atau upload ke Github | |
git push origin master | |
# Balik ke direktori sebelumnya | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment