forked from astropy/astropy-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
32 lines (26 loc) · 1.01 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
language: python
sudo: false
notifications:
email: false
python:
- 3.6
install:
- pip install pyyaml jinja2 requests
- git config --global user.name "intakebot"
- git config --global user.email "intakebot"
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch --all
# This auto-deploys the generated website to the gh-pages branch. This requires the
# GITHUB_USER and GITHUB_TOKEN variables to be set as secure variables through
# the Travis web interface. The former should be set to a GitHub username, and the
# second to a personal access token with scope 'public_repo'
script:
- python make_status.py
- mkdir deploy
- mv status.html deploy/index.html
- cp static/style.css deploy/
- git checkout gh-pages
- cp deploy/* .
- git add index.html style.css
- git commit -m "Updated dashboard" || true
- if [[ $TRAVIS_EVENT_TYPE != pull_request && $TRAVIS_BRANCH == master ]]; then git push -q -f https://$GITHUB_USER:$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG gh-pages; fi