Dan Anglin
b75a5c1eea
The following changes are included in this commit: - add a pipeline for publishing the output CV to the master branch when a change has been committed to the master branch. - split the CI configuration into two files: one for the docker build pipeline and the other for the CV build pipeline.
29 lines
762 B
YAML
29 lines
762 B
YAML
---
|
|
.use-cv-builder:
|
|
image: ${IMAGE_NAME}:master-5fbdaa5a
|
|
|
|
publish:cv:
|
|
extends: .use-cv-builder
|
|
before_script:
|
|
- eval $(ssh-agent -s)
|
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
|
- chmod 0400 ~/.ssh/known_hosts
|
|
- git remote set-url origin git@gitlab.com:${CI_PROJECT_PATH}.git
|
|
- git config --global user.email "${GITLAB_USER_EMAIL}"
|
|
- git config --global user.name "${GITLAB_USER_NAME}"
|
|
stage: publish
|
|
script:
|
|
- make
|
|
- git checkout master
|
|
- git add __output/cv.pdf
|
|
- 'git commit -m "auto: update CV."'
|
|
- git push origin master
|
|
only:
|
|
refs:
|
|
- master@dananglin/cv
|
|
except:
|
|
changes:
|
|
- docker/Dockerfile
|
|
- __output/*
|