#!/usr/bin/env bash # Script to package the PDF and the html. # Store them. # flush the current directory # checkout the gh-pages branch # extract the updated site over the current # add the changes # commit the changes # push the changes to github mkdir -p ~/tmp cp resume.pdf ~/tmp cp resume_for_recruiters.pdf ~/tmp cp ResumeSite.tar.gz ~/tmp # Prepare the current directory git clean -fq . git clean -fXq git checkout . #Checkout the deployment directory git checkout gh-pages # Move and extract the files tar -zxvf ~/tmp/ResumeSite.tar.gz . rm ~/tmp/ResumeSite.tar.gz mv ~/tmp/resume.pdf . mv ~/tmp/resume_for_recruiters.pdf . # Add the files git add . git commit -m "Auto updating resume site files" git push ssh://git@gitlab.sothr.com:9141/warricksothr/resume.git HEAD:gh-pages --force # Prepare the current directory git clean -fq . git clean -fdXq git checkout master git pull