Browse Source

Fixed pipeline for site deployment

master
Drew Short 5 years ago
parent
commit
5d9f9eb84a
  1. 60
      pipeline.yml

60
pipeline.yml

@ -70,35 +70,6 @@ jobs:
mv out/resume.html out/index.html
tar -czvf resume_site.tgz -C out/ .
mv resume_site.tgz ../resume-html/
- task: publish-gh-pages
config:
platform: linux
image_resource:
type: registry-image
source: { repository: alpine/git }
inputs:
- name: resume-pdf
- name: resume-html
- name: resume-github-gh-pages
outputs:
- name: updated-resume-github-gh-pages
run:
path: /bin/sh
args:
- -c
- |
git config --global user.email "concourse@warrick.sothr.com"
git config --global user.name "Concourse"
git clone resume-github-gh-pages updated-resume-github-gh-pages
cd resume-html
mkdir -p /tmp/resume_site
tar -zxvf resume_site.tgz -C /tmp/resume_site
cd ../updated-resume-github-gh-pages
rm -rf *
mv /tmp/resume_site/* .
cp ../resume-pdf/*.pdf .
git add .
git commit -m"Auto update of resume page"
- task: publish-site
config:
platform: linux
@ -119,7 +90,7 @@ jobs:
DEPLOY_USER: ((deploy.user))
DEPLOY_TARGET: ((deploy.target))
run:
path: /bin/sh
path: /bin/bash
args:
- -c
- |
@ -132,6 +103,35 @@ jobs:
cp resume-pdf/resume.pdf /tmp/deploy
cp resume-pdf/resume_for_recruiters.pdf /tmp/deploy
rsync -avz --delete-delay -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p ${DEPLOY_PORT}" --progress /tmp/deploy/* ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_TARGET}
- task: publish-gh-pages
config:
platform: linux
image_resource:
type: registry-image
source: { repository: alpine/git }
inputs:
- name: resume-pdf
- name: resume-html
- name: resume-github-gh-pages
outputs:
- name: updated-resume-github-gh-pages
run:
path: /bin/sh
args:
- -c
- |
git config --global user.email "concourse@warrick.sothr.com"
git config --global user.name "Concourse"
git clone resume-github-gh-pages updated-resume-github-gh-pages
cd resume-html
mkdir -p /tmp/resume_site
tar -zxvf resume_site.tgz -C /tmp/resume_site
cd ../updated-resume-github-gh-pages
rm -rf *
mv /tmp/resume_site/* .
cp ../resume-pdf/*.pdf .
git add .
git commit -m"Auto update of resume page"
- put: resume-github-gh-pages
params:
repository: updated-resume-github-gh-pages
Loading…
Cancel
Save