Fork me on GitHub

Deploy WP

Description: auto deploy the generated Static WP site to Github

if apt-cache policy unzip >/dev/null 2>&1; then
echo "Unzip is installed. Moving onto next step."
echo "Unzip wasn't detected. Installing Unzip... Please wait."
sudo apt-get --force-yes --yes install unzip

#making dir and unzipping the content
mkdir wptmp
unzip -d ~/wptmp

#making tmp directory for moving .git folder
mkdir gittmp
mv ~/wordpress/.git ~/gittmp
cp -a ~/wptmp/ ~/wordpress
mv ~/gittmp/.git ~/wordpress/
cd wordpress

#git commands
git add .
git commit -a -m "$1"
git push

#removing temp directory
rm -rf ~/wptmp
rm -rf ~/gittmp

Download the Script here.