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
  name = Richard Chen
  email =
  ui = auto

#build the environment
sudo apt-get update && sudo apt-get -y install build-essential git curl nodejs
gpg --keyserver hkp:// --recv-keys D39DC0E3
curl -sSL | 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
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.