-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (30 loc) · 1 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
language: node_js
dist: trusty
sudo: required
notifications:
email:
on_success: always
on_failure: always
services:
- docker
before_install:
- docker pull jpcercal/jpcercal.com:latest
install:
- docker run -v $PWD:/usr/share/blog jpcercal/jpcercal.com:latest /bin/bash -l -c "npm install"
- docker run -v $PWD:/usr/share/blog jpcercal/jpcercal.com:latest /bin/bash -l -c "npm run napa"
script:
- docker run -v $PWD:/usr/share/blog jpcercal/jpcercal.com:latest /bin/bash -l -c "BASE_URL=$BASE_URL grunt production"
after_success:
- docker login -u jpcercal -p $DOCKER_PASSWORD
- docker tag jpcercal/jpcercal.com:latest jpcercal/jpcercal.com:$TRAVIS_BUILD_NUMBER
- docker push jpcercal/jpcercal.com
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: public
target_branch: gh-pages
on:
branch: master
after_deploy:
- docker run -v $PWD:/usr/share/blog jpcercal/jpcercal.com:latest /bin/bash -l -c "GOOGLE_API_KEY=$GOOGLE_API_KEY grunt pagespeed"