-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
42 lines (35 loc) · 1.67 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
language: python
python:
- "3.6"
cache: pip
branches:
only:
- master
env:
global:
secure: lUGBgPqyBV8tN7RU8dL+LLXH6YsF8N5xSxC61aJqHES8AK/PD2GhxowzkABR+OLLwQk1O8jf6Cp7q32I6rkKs+bpZfn4Ps8FECL5Cx+XhEPkstHJhH5hegZq9MwAfq4lMOZ+c0DsxNSG3WSNHq/7z6tNl+mq8a21eCWlzzWvMfRyM4WrZN37Cy+S2c0s5DN+q6T3ck3+SPOmR87vXorRUo7qYB0t0CWvCX2eqme24QardSDJJym8QjWt/vTyHJGwH/rEt5NG/JgTPKvTRSNwibwTGg3EsYYUV2sMUXhKaO/th9rRy7tc3xrzWQWrEkvbH0r+VkUztgU4Isj2FPxc+6p/v2jX8EAf49T/CXDq9i64lDw2C2BSUY0XrK2sUvkZtBomw4WTalOPXyxk8Ici3xawizzK7pwXvkAUmNgyjvRY+4998TE24LHXo7IU+JR07dB18MhfhRIZ8WE2aej3eRFER/yzh4HkKx0NuCugioSvTTl2zcv5ZPwfIDf2onhztwTrS2bEhpLaVxbgkUK0f15SnRMFJHjexbRtzoHXct6cgIMpv+KMYdAUkvctECvSFJJ2zWx6cN1b3czOFbZF7hn/9dxDRSgjVY2DeN0l9Gr49P6e17rqbeNdeDogZYfboZdN/c8eLN5twTKrc6WfJJD9fwKDOoWh878KAujvg3g=
install:
- pip install -r requirements.txt
before_script:
- git config --global user.email "travis@travis-ci.org"
- git config --global user.name "TravisCI"
- git config --global push.default "matching"
script:
- revision=$(git rev-parse --short HEAD)
- git clone -b gh-pages "https://$GITHUB_TOKEN@github.com/adblock-thai/thai-ads-filter" output_filters
- python FOP.py
- python render.py
- cd output_filters && git add --all .
- git commit -m "⚡️ Publishing revision $revision"
- git push --force origin gh-pages
- cd ..
- rm -rf output_filters
- |
if ! git diff --name-only | grep -qE 'filter.*txt'
then
echo "Not running CI since only filters were changed."
exit 0
fi
- git add .
- git commit -m "♻️ Auto FOP from Travis revision $revision [skip ci]"
- git push https://pakonda:$GITHUB_TOKEN@github.com/adblock-thai/thai-ads-filter HEAD:master