-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (32 loc) · 868 Bytes
/
.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
language: python
python: "3.6"
install:
- wget ftp://ftp.unicode.org/Public/12.1.0/ucd/Unihan.zip
- unzip -d Unihan Unihan*.zip
script:
- '[[ "$TRAVIS_TAG" = "" ]] || grep "$TRAVIS_TAG" README.md'
- '[[ "$TRAVIS_TAG" = "" ]] || grep "${TRAVIS_TAG%-[0-9]*}" .travis.yml'
- ./process.py Unihan unihan-json
- |
git clone \
-b gh-pages \
"https://$GITHUB_TOKEN:[email protected]/dahlia/unihan-json.git" \
/tmp/gh-pages
- rm -rf /tmp/gh-pages/$TRAVIS_BRANCH
- cp -r unihan-json /tmp/gh-pages/$TRAVIS_BRANCH
- |
pushd /tmp/gh-pages
git add "$TRAVIS_BRANCH"
git commit -m "Update: $TRAVIS_BRANCH"
git push origin gh-pages
popd
before_deploy:
- tar cvfz "unihan-json-$TRAVIS_TAG.tar.gz" unihan-json/
deploy:
- provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: unihan-json-*.tar.gz
skip_cleanup: true
on:
tags: true