From 1013039633bbb91a6916b76bacf6ea1ee6abcd8b Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 30 Sep 2015 17:39:43 -0500 Subject: [PATCH 1/4] Create README.md --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4796b7d --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# [View Resume](https://warricksothr.github.io/resume) From b5cc74f80897cdaf9b2c8ef491c1c707155e9234 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 30 Sep 2015 18:37:38 -0500 Subject: [PATCH 2/4] Working on deployment scripts --- .gitignore | 2 +- build-html.sh | 6 ++++++ build-pdf.sh | 4 ++++ package-and-deploy.sh | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 build-html.sh create mode 100755 build-pdf.sh create mode 100755 package-and-deploy.sh diff --git a/.gitignore b/.gitignore index 96f8342..85e8d01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ +*~ *.xref *.lg *.idv *.4ct *.4tc *.tmp -*.sh ## Core latex/pdflatex auxiliary files: *.aux diff --git a/build-html.sh b/build-html.sh new file mode 100755 index 0000000..eabbfce --- /dev/null +++ b/build-html.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Script to build an HTML site from the PDF source +docker run -d -P --name pdf2htmlex -v /pdf sothr/pdf2htmlex pdf2htmlex --embed cfijo --dest-dir out DPSResume.pdf + +tar -czvf ResumeSite.tar.gz out/* diff --git a/build-pdf.sh b/build-pdf.sh new file mode 100755 index 0000000..54e655b --- /dev/null +++ b/build-pdf.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Script to build a PDF from the latex source +docker run -d -P --name latex -v /latex narf/latex latex --output-format pdf DPSResume.tex diff --git a/package-and-deploy.sh b/package-and-deploy.sh new file mode 100755 index 0000000..97717a8 --- /dev/null +++ b/package-and-deploy.sh @@ -0,0 +1,15 @@ +#!/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 + +cp DPSResume.pdf .. +cp ResumeSite.tar.gz .. + +git checkout . From 9a2106a7f167f9a9c9ee6aab1edcabc15ae1ed34 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 30 Sep 2015 18:39:25 -0500 Subject: [PATCH 3/4] More script work --- package-and-deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/package-and-deploy.sh b/package-and-deploy.sh index 97717a8..1756bed 100755 --- a/package-and-deploy.sh +++ b/package-and-deploy.sh @@ -12,4 +12,5 @@ cp DPSResume.pdf .. cp ResumeSite.tar.gz .. +git clean -f . git checkout . From 85fa0055a781a8b09e309244792ffe899b13fab0 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Wed, 30 Sep 2015 18:43:29 -0500 Subject: [PATCH 4/4] Tweaking script --- package-and-deploy.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/package-and-deploy.sh b/package-and-deploy.sh index 1756bed..6ac8778 100755 --- a/package-and-deploy.sh +++ b/package-and-deploy.sh @@ -9,8 +9,22 @@ # commit the changes # push the changes to github -cp DPSResume.pdf .. -cp ResumeSite.tar.gz .. +cp DPSResume.pdf ~ +cp ResumeSite.tar.gz ~ -git clean -f . +# Prepare the current directory +git clean -fq . +git clean -Xq git checkout . + +#Checkout the deployment directory +git checkout tags/gh-pages + +# Copy the files +tar -zxvf ~/ResumeSite.tar.gz . +cp ~/DPSResume.pdf . + +# Add the files +git add . +git commit -m "Auto updating resume site files" +git push origin gh-pages