forked from pingcap/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
48 lines (41 loc) · 1.58 KB
/
circle.yml
File metadata and controls
48 lines (41 loc) · 1.58 KB
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
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 SUCK"
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
# echo "222.222.95.49 uc.qbox.me": adds a new host
- deploy:
name: "Publish PDF"
command: |
sudo bash -c 'echo "222.222.95.49 uc.qbox.me" >> /etc/hosts';
if [ "${CIRCLE_BRANCH}" == "master" ]; then
python3 scripts/upload.py dev/output.pdf tidb-manual-en-dev.pdf;
python3 scripts/upload.py v3.0/output.pdf tidb-manual-en-v3.0.pdf;
python3 scripts/upload.py v2.1/output.pdf tidb-manual-en-v2.1.pdf;
fi
if [ "${CIRCLE_BRANCH}" == "website-preview" ]; then
python3 scripts/upload.py dev/output.pdf tidb-manual-en-preview-dev-test.pdf;
python3 scripts/upload.py v3.0/output.pdf tidb-manual-en-preview-v3.0-test.pdf;
python3 scripts/upload.py v2.1/output.pdf tidb-manual-en-preview-v2.1-test.pdf;
fi
- run:
name: "Copy Generated PDF"
command: mkdir /tmp/artifacts && cp dev/output.pdf dev/doc.md /tmp/artifacts
- store_artifacts:
path: /tmp/artifacts