forked from giordanna/boilerplate-nuxtjs-ionic4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (76 loc) · 2.85 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
notifications:
email: false
git:
quiet: true
depth: false
language: node
node_js: lts/*
python: 3.7
service: docker
os: linux
addons:
apt:
update: true
packages:
- curl
- sudo
- lsof
- docker-ce
- python3-pip
install: true
before_install:
- export DISPLAY=:99.0
- |
if [ ! -f ${HOME}/.local/daggerok/bash-functions/master/main.bash ] ; then
mkdir -p ${HOME}/.local/daggerok/bash-functions/master ;
curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash > ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
fi
source ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
- stop_any 80 3000 5000 8080 5432
- export PATH=$HOME/.local/bin:$PATH
- pip3 install --user --upgrade pip setuptools
- pip install --user --upgrade httpie
jobs:
include:
- stage: test
name: test
before_script:
- cd $TRAVIS_BUILD_DIR && npm i -E
- cd $TRAVIS_BUILD_DIR && npm run build
- docker run -d --rm --name app -p 80:80 -v $TRAVIS_BUILD_DIR/dist:/usr/share/nginx/html:ro
--health-cmd="wget -q --spider http://127.0.0.1:80/ || exit 1"
--health-start-period=1s
--health-interval=1s
--health-retries=33
--health-timeout=1s
nginx:1.17.6-alpine
- wait_healthy_docker_containers 1
script:
- http :/
after_script: docker rm -f -v app
- stage: deploy
name: GitHub pages deploy
script: skip
jdk: openjdk8
before_deploy:
- cd $TRAVIS_BUILD_DIR && npm i
- cd $TRAVIS_BUILD_DIR && npm run predeploy
env:
- secure: "mLSm+KHEaFbKeH2EwwrZTg1MO09T7A7b8hwZ6QUnSXAEZ4WfrLe5nKsMlIKNhO5kwWsudgjq9vpOv8UtpwzRs33k98rciZm7lfP6XxvdcS4FWosT3Tq692neiRp8cbmeMwi86jqq9OFSJEQJ72nb4neFJaRDDNtmwyTpWVodoCmhtn93A35oW3+N49czYc54RFdO1LfQ9RLEGHNn+zWR2+0fgxM8DJqralMmJrg21K/XOfhw9P7PmOVhPHzSaN24DODXWHNufZ5icrfjuf4jbs5i47Q9fUmS97xArjdcZVv8cSiDjYgdmGq3ZGMk5vreBGaNEB6i0eCMW8cFXOIrV9PYrksLmuQwumROfQqZBrKbsOxnyJtP/4vu8Xw9/jtOw99TmySiJbhdoCwKBzlkvQuq/4tZ0YlHO2avW+0SbatFoDvwSK6eG0Wcio9vpPIfli+KBAXyRN2ctYycXmpkmzy7SP6We8E2KiRRiFinfirR4Dku1M5rMnY7Po6XIszQW3xa5JKxN9YcNelJIWS2o3TsZtWRaHZCc3kO0ZAnEjmkS4QbjoMNq8iq1aXp3t0U55xy1NW3tYgIBHPDljrc4WGW+4L5oBmooBIsVnqgD3JsOPbsW8Gm88NFUw7C5lVJQAZvz7nL/XX6YzI2soBEq9qMwDyBq7lF5pUFZ30e0g4="
deploy: &pages
provider: pages
skip-cleanup: true
keep-history: true
target_branch: gh-pages
# travis encrypt GITHUB_TOKEN=<your github repo token> --add
github-token: "$GITHUB_TOKEN"
local-dir: $TRAVIS_BUILD_DIR/dist
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|ci)$
cache:
directories:
- ~/.m2
- ~/.n*
- node_modules
- ~/.local/daggerok