-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
44 lines (44 loc) · 1.24 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
language: python
cache:
pip: true
directories:
- node_modules
python:
- 3.6
services:
- docker
before_install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install 12
install:
- pip install -r requirements.txt
- npm install .
script:
- set -e
- chmod +x ./scripts/build.sh && ./scripts/build.sh
- mkdocs build -v
- node --max_old_space_size=3072 ./scripts/render_math.js
- npx gulp minify
- python scripts/gen_redirect.py
- touch ./site/.nojekyll # Stop GitHub Pages from ignoring files with underscores prefixed
- cp -r site/ site-cdn-pages
- node ./scripts/replace_cdn.js
- set +e
deploy:
provider: pages
skip_cleanup: true
github-token: $GH_TOKEN
local-dir: site
on:
branch: master
after_deploy:
- chmod +x scripts/BaiduPusher.sh && ./scripts/BaiduPusher.sh
- cd site-cdn-pages && git init
- git checkout -b cdn-pages
- git add .
- git config user.name "Travis Builder"
- git config user.email "[email protected]"
- git commit --author "24OI-bot <[email protected]>" -m "build cdn files"
- git remote add gh-token "https://${GH_TOKEN}@github.com/OI-wiki/OI-wiki.git";
- git push gh-token cdn-pages -f