-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.gitlab-ci.yml
56 lines (51 loc) · 1.2 KB
/
.gitlab-ci.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
stages:
- docker
- build
- deploy
image: registry.gitlab.com/taichunmin/docker-compose-git:latest
cache:
key: "$CI_PIPELINE_ID"
paths:
- public/
build-docker:
stage: docker
services:
- docker:dind
tags:
- docker
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f docker-build.yml build
- docker-compose -f docker-build.yml push
- docker-compose -f docker-build.yml down --rmi all
only:
- web
build-book:
stage: build
image: registry.gitlab.com/taichunmin/progit2-zh-tw:latest
tags:
- docker
script:
- mkdir images
- cp book/*/images/* images/
- asciidoctor progit.asc || true
- asciidoctor-pdf -r asciidoctor-pdf-cjk-kai_gen_gothic -a pdf-style=KaiGenGothicTW progit.asc || true
- asciidoctor-epub3 progit.asc || true
- asciidoctor-epub3 -a ebook-format=kf8 progit.asc || true
- mkdir public
- cp progit.{pdf,epub} progit-kf8.epub public/ || true
- cp progit.html public/index.html
- cp -r images/ public/
- ls public
pages:
stage: deploy
script:
- ls public
tags:
- docker
artifacts:
when: always
paths:
- public
only:
- master