forked from SYSU-SCC/sysu-thesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
50 lines (44 loc) · 1.16 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
# Gitlab持续集成配置文件
# Author: Souler Ou
# 修改者: 欧一锋
# Date: 4/1/2018
# Mail: [email protected]
# 使用ubuntu-texlive环境
image: ablu/ubuntu-texlive-full:latest
# 一系列准备
before_script:
- apt-get update
# 安装中文包和git控制器
- apt-get install -y git language-pack-zh-hans language-pack-zh-hant
# 处理字体
- mkdir -p /usr/share/fonts/opentype
- git clone https://github.com/a20185/adobefonts
- chmod +x adobefonts/runner.sh
- adobefonts/runner.sh
# 刷新缓存以及之后的操作
- fc-cache -f -v
# 将Times New Roman 更换为 Nimbus No9 L字体
- sed -i 's/Times New Roman/Nimbus Roman No9 L/g' sysuthesis.cls
- rm -R adobefonts
stages:
- build
# 暂时无部署的部分(没有静态文件服务器 or git权限得到控制的token)
# - deploy
test_build:
stage: build
script:
- git checkout -b ci-build
- make
artifacts:
paths:
- main.pdf
name: "CI-$CI_COMMIT_REF_NAME-${CI_COMMIT_SHA:0:7}"
when: on_success
only:
- master
- dev
# 编译好的文件自动上传静态文件服务器(如七牛之类的)
# deploy_to_server:
# stage: deploy
# script:
# # 需要有静态文件服务器