Browse Source

Updating pipeline to auto deploy gh-pages

master
Drew Short 5 years ago
parent
commit
44647d7884
  1. 39
      pipeline.yml

39
pipeline.yml

@ -11,12 +11,21 @@ resources:
- pipeline.yml - pipeline.yml
- upload_pipeline.sh - upload_pipeline.sh
- README.md - README.md
- name: resume-github-gh-pages
type: git
icon: github-circle
source:
uri: git@github.com:warricksothr/resume.git
private_key: |
((push_key_github))
branch: gh-pages
jobs: jobs:
- name: publish - name: publish
plan: plan:
- get: resume-git - get: resume-git
trigger: true trigger: true
- get: resume-github-gh-pages
- task: build-resume-pdf - task: build-resume-pdf
config: config:
platform: linux platform: linux
@ -61,3 +70,33 @@ jobs:
mv out/resume.html out/index.html mv out/resume.html out/index.html
tar -czvf resume_site.tgz -C out/ . tar -czvf resume_site.tgz -C out/ .
mv resume_site.tgz ../resume-html/ 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-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/* .
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