forked from pingcap/docs-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
42 lines (35 loc) · 1.07 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
version: 2
jobs:
build:
docker:
- image: andelf/doc-build:0.1.9
working_directory: ~/pingcap/docs-cn
branches:
only:
- master
- website-preview
steps:
- checkout
- run:
name: "Special Check for Golang User"
command: grep -RP '\t' * | tee | grep '.md' && exit 1; echo ok
- run:
name: "Merge Makedown Files"
command: python3 scripts/merge_by_toc.py
- run:
name: "Generate PDF"
command: scripts/generate_pdf.sh
- deploy:
name: "Publish PDF"
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
python3 scripts/upload.py output.pdf tidb-manual-cn.pdf;
fi
if [ "${CIRCLE_BRANCH}" == "website-preview" ]; then
python3 scripts/upload.py output.pdf tidb-manual-cn-preview.pdf;
fi
- run:
name: "Copy Generated PDF"
command: mkdir /tmp/artifacts && cp output.pdf doc.md /tmp/artifacts
- store_artifacts:
path: /tmp/artifacts