From 00d7b62ed5654dc613d4a9125394676afef570ae Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 4 Feb 2019 17:18:32 -0600 Subject: [PATCH] Adding github pages deployment support --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 093d4b6..d36bcbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,4 +35,31 @@ deploy-resume-site: - master tags: - docker - environment: production \ No newline at end of file + environment: production + + deploy-resume-github: + image: sothr.com/deploy:ubuntu + stage: deploy + variables: + GIT_REPO: git@github.com:warricksothr/resume.git + script: + - eval `ssh-agent -s` + - ssh-add <(echo "$SSH_DEPLOY_KEY") + - git pull $GIT_REPO /tmp/deploy + - pushd /tmp/deploy + - git checkout -b gh-pages origin/gh-pages + - rm -rf * + - popd + - tar -xvf ResumeSite.tar.gz -C /tmp/deploy + - cp resume.pdf /tmp/deploy + - cp resume_for_recruiters.pdf /tmp/deploy + - pushd /tmp/deploy + - git add . + - git commit -am"$CI_COMMIT_MESSAGE" + - git push + - popd + only: + - master + tags: + - docker + environment: production