-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
44 lines (40 loc) · 1.27 KB
/
circle.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
general:
branches:
only:
- master
machine:
timezone:
Asia/Tokyo
services:
- docker
dependencies:
pre:
- docker pull miyukki/docker-texlive
- docker pull miyukki/redpen:1.7.6
- git config --global user.email '[email protected]'
- git config --global user.name 'Yusei Yamanaka'
test:
override:
- exec docker run -i --net=none -v $(pwd):/data miyukki/docker-texlive /bin/sh -c "make"
post:
- mkdir $CIRCLE_ARTIFACTS/section
- exec docker run -i --net=none -v $(pwd):/data -v $CIRCLE_ARTIFACTS:/artifacts miyukki/redpen:1.7.6 find . -name "*.tex" -exec /bin/sh -c 'redpen {} > /artifacts/{}.redpen.txt' \;
deployment:
release:
branch: master
commands:
- mv main.pdf /tmp/main.pdf
- mv main-binder.pdf /tmp/main-binder.pdf
- |
if git ls-remote origin | grep -q refs/heads/release; then
git fetch
git checkout -b release origin/release
else
git checkout --orphan release
git rm --cached -r .
fi
- cp -f /tmp/main.pdf main.pdf
- cp -f /tmp/main-binder.pdf main-binder.pdf
- git add -f main.pdf main-binder.pdf
- git commit -m "[ci skip] Build pdf $(git log $CIRCLE_BRANCH -1 --oneline)"
- git push -f origin release