-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (80 loc) · 3.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
dist: trusty
os: linux
language: generic
services: docker
branches:
only:
- master
jobs:
include:
- stage: Compile
before_install: |
if [ -n "$GITHUB_API_KEY" ]; then
git remote add upstream https://$GITHUB_USER:$GITHUB_API_KEY@github.com/$TRAVIS_REPO_SLUG
git checkout --orphan $TRAVIS_BRANCH-pdf
git rm -rf .
touch Readme.md
git add Readme.md
git -c user.name='travis' -c user.email='travis' commit -m "Initial commit"
git push -q -f upstream $TRAVIS_BRANCH-pdf
git checkout $TRAVIS_BRANCH
fi
install:
- docker pull jesperdramsch/tectonic-docker
before_script: |
if [ -n "$GITHUB_API_KEY" ]; then
git remote add upstream https://$GITHUB_USER:$GITHUB_API_KEY@github.com/$TRAVIS_REPO_SLUG
git fetch upstream
git checkout $TRAVIS_BRANCH-pdf
git pull -f -q upstream $TRAVIS_BRANCH-pdf
git checkout $TRAVIS_BRANCH
fi
script: |
docker run --mount src=$TRAVIS_BUILD_DIR,target=/usr/src/tex,type=bind jesperdramsch/tectonic-docker \
/bin/bash -c 'mkdir -p _build; \
for i in "heros" "print" "nocolors" "a4paper" "alegreya" "merriweather" "nunito" "roboto"; do \
echo "=== Executing option $i ==="; \
echo "\documentclass[$i]{friggeri-cv}" > .head; \
tectonic --keep-intermediates --reruns 0 -o _build cv.tex && \
biber --input-directory _build cv && \
tectonic -o _build cv.tex || exit 1; \
echo "=== Copying and Clean up ==="; \
cp _build/cv.pdf cv-$i.pdf; \
rm -rf _build/*; \
done; \
tectonic -o _build coverletter.tex && \
cp _build/coverletter.pdf coverletter.pdf || exit 1'
after_script: |
if [ -n "$GITHUB_API_KEY" ]; then
git stash -q
git fetch upstream
git checkout $TRAVIS_BRANCH-pdf
git pull -q -f upstream $TRAVIS_BRANCH-pdf
for DOCOPTIONS in heros print nocolors a4paper alegreya merriweather nunito roboto; do
git checkout -f master cv-$DOCOPTIONS.pdf
git add -f cv-$DOCOPTIONS.pdf
git -c user.name='travis' -c user.email='travis' commit -m "current pdf with $DOCOPTIONS option"
git push -q upstream $TRAVIS_BRANCH-pdf
done
git checkout -f master coverletter.pdf
git add -f coverletter.pdf
git -c user.name='travis' -c user.email='travis' commit -m "coverletter pdf"
git push -q upstream $TRAVIS_BRANCH-pdf
fi
- stage: Deploy
install:
- sudo apt-get -qq update
- sudo -E apt-get -yq --reinstall --no-install-suggests --no-install-recommends --force-yes install ghostscript imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev
script: |
if [ -n "$GITHUB_API_KEY" ]; then
git remote add upstream https://$GITHUB_USER:$GITHUB_API_KEY@github.com/$TRAVIS_REPO_SLUG
git fetch -q upstream
git checkout $TRAVIS_BRANCH-pdf
git pull -f upstream $TRAVIS_BRANCH-pdf
mkdir -p png
mogrify -density 288 -resize 25% -format png *.pdf
mv *.png png/
git add -f png/*.png
git -c user.name='travis' -c user.email='travis' commit -m "pngs for readme"
git push -q upstream $TRAVIS_BRANCH-pdf
fi