forked from pingcap/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
43 lines (36 loc) · 1.16 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
version: 2
jobs:
build:
docker:
- image: andelf/doc-build:0.1.9
working_directory: ~/pingcap/docs
branches:
only:
- master
- website-preview
steps:
- checkout
- run:
name: "Special Check for Golang User - YOUR TAB SUCKS"
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: |
sudo bash -c 'echo "119.188.128.5 uc.qbox.me" >> /etc/hosts';
if [ "${CIRCLE_BRANCH}" == "master" ]; then
python3 scripts/upload.py output.pdf tidb-manual-en.pdf;
fi
if [ "${CIRCLE_BRANCH}" == "website-preview" ]; then
python3 scripts/upload.py output.pdf tidb-manual-en-preview.pdf;
fi
- run:
name: "Copy Generated PDF"
command: mkdir /tmp/artifacts && cp output.pdf doc.md /tmp/artifacts
- store_artifacts:
path: /tmp/artifacts