-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (40 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
45
os: linux
sudo: required
dist: trusty
language: python
python: 3.6
install:
- pip3 install pipenv
- pipenv install
before_script:
# prepare the repositories
- git clone --depth=1 https://github.com/carls-app/weekly-movie weekly-movie
- cd weekly-movie
# set up git to commit
- git config user.name "SUMO Databot"
- git config user.email "[email protected]"
stages:
- {name: fetch, if: type = cron}
- {name: build}
jobs:
include:
- stage: fetch
script:
# fetch the next movie
- python3 ../bin/download-feed.py
# commit
- git add .
- git commit -m "sumo movie update $(date)" || (echo "No updates found." && exit 0)
- git push "https://[email protected]/carls-app/weekly-movie.git" master
- stage: build
script: pipenv run ../bin/build.py
after_success:
- |
if [[ $TRAVIS_BRANCH = master ]]; then
# prepare the gh-pages branch
git checkout -B gh-pages master --no-track
# and … push
git add --all ./
git commit -m "rendered weekly movie info" --quiet
git push -f "https://[email protected]/carls-app/weekly-movie.git" gh-pages
fi