-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
53 lines (45 loc) · 1.7 KB
/
.travis.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
notifications:
email:
on_success: never
before_install:
- openssl aes-256-cbc -K $gitee_key -iv $gitee_iv -in ./.travis/travis.key.enc -out gitee_deploy_key -d
- chmod 600 gitee_deploy_key
- eval $(ssh-agent)
- ssh-add gitee_deploy_key
- git remote add gitee [email protected]:c4pr1c3/cuc-ns-ppt.git
install:
- sudo apt-get update
- wget https://github.com/jgm/pandoc/releases/download/2.9.1.1/pandoc-2.9.1.1-1-amd64.deb && sudo dpkg -i pandoc-2.9.1.1-1-amd64.deb
before_script:
- pandoc -v
script:
- bash render.sh
after_script:
- git checkout -b gh-pages
- git add *.html
- git submodule update --init --recursive # prepare to translate submodule to regular dir
- mv lib/reveal.js lib/reveal.js_tmp # ref: https://stackoverflow.com/questions/1759587/un-submodule-a-git-submodule
- mv lib/reveal.js.v4 lib/reveal.js.v4_tmp # ref: https://stackoverflow.com/questions/1759587/un-submodule-a-git-submodule
- git submodule deinit lib/reveal.js
- git submodule deinit lib/reveal.js.v4
- git rm lib/reveal.js lib/reveal.js.v4
- mv lib/reveal.js_tmp lib/reveal.js
- mv lib/reveal.js.v4_tmp lib/reveal.js.v4
- rm -rf lib/reveal.js/.git
- rm -rf lib/reveal.js.v4/.git
- rm -rf lib/reveal.js.v4/plugin/reveal.js-plugins/.git
- rm -rf lib/reveal.js.v4/plugin/reveal.js-plugins/menu/.git
- git add lib/reveal.js
- git add lib/reveal.js.v4
- git commit -m "Updated By Travis-CI With Build $TRAVIS_BUILD_NUMBER For Github Pages"
- git push --force --quiet "https://${TOKEN}@${REF}" gh-pages
- git push --force --quiet gitee gh-pages
branches:
only:
- master
env:
global:
- REF=github.com/c4pr1c3/cuc-ns-ppt.git # 设置 github 地址
addons:
ssh_known_hosts:
- gitee.com