forked from ubyssey/ubyssey.ca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (52 loc) · 2.17 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
46
47
48
49
50
51
52
53
sudo: false
language: python
python:
- '2.7'
before_install:
- openssl aes-256-cbc -K $encrypted_d55f894abbe8_key -iv $encrypted_d55f894abbe8_iv -in client-secret.json.enc -out client-secret.json -d
- export PYTHONPATH="${PYTHONPATH}:${TRAVIS_BUILD_DIR}/lib"
install:
- pip install -r requirements-prd.txt -t lib/
- pip install requests --upgrade -t lib/
- sudo apt-get install -qq libexempi3
- cd ubyssey/static
- npm install -g gulp
- npm install
script:
- gulp build
after_success:
# clean up node_modules
- cd ${TRAVIS_BUILD_DIR}
# use deploy settings
- mv _settings/settings-dpl.py ubyssey/settings.py
- python manage.py collectstatic --noinput
# gzip static files
- find ${TRAVIS_BUILD_DIR}/gcs -type f -exec gzip "{}" \; -exec mv "{}.gz" "{}" \;
# replace deploy settings with production settings
- rm ubyssey/settings.py ubyssey/settings.pyc
- mv _settings/settings-prd.py ubyssey/settings.py
- rm -rf .git/ ubyssey/static/
- pip install -I google-cloud-storage==1.13.2 -t lib/
deploy:
- provider: gcs
access_key_id: GOOG6VXJ7FN5TYTTPSQI
secret_access_key:
secure: saCd6ww5nyVA1vUKjmKoe1s+Xf6B+gWWQOTFs8pnQyacSPI9KnGZ3/+H41OoZyMkV8gNEOzgMaFd1eKyO5npisaVas/a0VDtStPek0WtfzTGpEsUDfzAPzC18H2dOzwv25EmpRDcY6YIe9qaove7yOQ5ptAKkWlbUlh9jsG7r88shQtJNP91TYoSaBtpX8YMvmxkFTFuzgQ/M5Mxmz/ObtMfNj9WyGBRtSVKss1tIMvhwxHHUc+R7EYIcVoUgsLIdOtkdqe6iDPEx3qBJsrg2uu1i7SmGvpoQwIPXheqZEKxpbaSzenxy2UXD6zXjFgS9xP0nz06t3OKjIce10jhR3+d2FNffeadwbEEj/UuLqSmU/p0W2S4pzdGDxZRpgADxmfMwqG+qP8l177Pyui1c+npCUvVtON0F850Ih8P3G9gQZiyz3rKOFzISEym62H8HiPYA04dqnis/F5+ELa6QkMwNQZKlGQAHBJ849bT4K72/X8yq6ywZiXVE+6meqsIdAWmUDUBvoDAVNCuLW6AMtW387/WwqzKG5+qcx7tvuRrgowhk1JNdldLdw+7XtEuZ82XRO/EMeytdubDLwqpNjflqpRGTb0qDvByffSrzBrPAVXp5/zC3D1E5uQI/eONiYeAlR+vhOLm5UIAIor5KXojFb5eVTKd1xcCPI8uZpg=
bucket: ubyssey
skip_cleanup: true
acl: public-read
local-dir: ${TRAVIS_BUILD_DIR}/gcs
detect_encoding: true
cache_control: "max-age=31536000"
verbosity: "debug"
on:
tags: true
- provider: gae
keyfile: client-secret.json
project: ubyssey-prd
default: true
version: ubyssey-${TRAVIS_TAG//./-} # Replace periods with hyphens
skip_cleanup: true
verbosity: "debug"
on:
tags: true