1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-25 16:01:38 +03:00
Files
okhttp/deploy_website.sh
2013-04-30 11:55:09 -07:00

36 lines
606 B
Bash
Executable File

#!/bin/bash
set -ex
DIR=temp-clone
# Delete any existing temporary website clone
rm -rf $DIR
# Clone the current repo into temp folder
git clone git@github.com:square/okhttp.git $DIR
# Move working directory into temp folder
cd $DIR
# Checkout and track the gh-pages branch
git checkout -t origin/gh-pages
# Delete everything
rm -rf *
# Copy website files from real repo
cp -R ../website/* .
# Stage all files in git and create a commit
git add .
git add -u
git commit -m "Website at $(date)"
# Push the new files up to GitHub
git push origin gh-pages
# Delete our temp folder
cd ..
rm -rf $DIR