ITSYC’s Blog

deploy.sh

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/bin/bash

echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
hugo --cleanDestinationDir

cd public
git add -A

msg="rebuilding site `LANG=C date`"
if [ $# -eq 1 ]
  then msg="$1"
fi
git commit -m "$msg"

git push origin master

cd ..