Here’s my latest edit to a Vagrant file for github-pages which I forked to contribute back to the community:

#write to synced folder /vagrant/files/.gitconfig
cat > /vagrant/files/.gitconfig
[user]
  name = Richard Chen
  email = 4richardchen@users.noreply.github.com
[color]
  ui = auto

#build the environment
sudo apt-get update && sudo apt-get -y install build-essential git curl nodejs
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --rails
source /usr/local/rvm/scripts/rvm
sudo gem install github-pages --no-ri --no-rdoc

#customize for user, inside vagrant ssh
cd /vagrant
git submodule add https://richardc020@bitbucket.org/richardc020/condo.git/
cat > ~/.bash_profile
cp /vagrant/files/.gitconfig home/vagrant/.gitconfig
cd /vagrant/reponame
#start working

Ironically, the work to publish this site is itself a code sample.