Skip to content

Commit 0af1958

Browse files
committed
adds travis
1 parent 7073301 commit 0af1958

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: node_js
2+
addons:
3+
ssh_known_hosts:
4+
- quasar.cross-solution.de
5+
node_js:
6+
- 10.15.3
7+
cache:
8+
directories:
9+
- node_modules
10+
- "$HOME/.composer/cache"
11+
- "$HOME/.yarn"
12+
matrix:
13+
fast_finish: true
14+
include:
15+
- php: '7.2'
16+
branches:
17+
only:
18+
- master
19+
before_install:
20+
- openssl aes-256-cbc -K $encrypted_ccc4868af128_key -iv $encrypted_ccc4868af128_iv
21+
-in .travis/deploy.enc -out ~/.ssh/id_ed25519 -d
22+
- eval "$(ssh-agent -s)"
23+
- chmod 600 ~/.ssh/id_ed25519
24+
- ssh-add ~/.ssh/id_ed25519
25+
- curl -LO https://deployer.org/deployer.phar
26+
- chmod +x deployer.phar
27+
install:
28+
- yarn
29+
- node_modules/.bin/quasar build -m ssr
30+
script:
31+
- node_modules/.bin/quasar test --unit jest
32+
deploy:
33+
- provider: script
34+
skip_cleanup: true
35+
script: "./deployer.phar deploy"
36+
on:
37+
branch: master

.travis/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
deploy.pub
2+
deploy

.travis/deploy.enc

400 Bytes
Binary file not shown.

deploy.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
namespace Deployer;
3+
4+
require 'recipe/zend_framework.php';
5+
6+
// Project name
7+
set('application', 'cross-cms');
8+
9+
// Shared files/dirs between deploys
10+
add('shared_files', [
11+
'.env'
12+
]);
13+
14+
// Project repository
15+
set('repository', 'https://github.com/cross-solution/cms.git');
16+
17+
set('default_stage', 'prod');
18+
19+
// deploy to Hosts
20+
host('quasar.cross-solution.de')
21+
->user('nuxt')
22+
->stage('prod')
23+
->multiplexing(false)
24+
->set('deploy_path', '/srv/cms')
25+
->set('writableusesudo', true);
26+
27+
// if deploy fails automatically unlock.
28+
after('deploy:failed', 'deploy:unlock');
29+
30+
// run npm
31+
after('deploy:symlink', 'yarn');
32+
33+
// restart nodeserver
34+
after('cleanup', 'restart');
35+
36+
task('yarn', '
37+
~/.yarn/bin/yarn;
38+
node_modules/.bin/quasar build -m ssr;
39+
');
40+
41+
task('restart', '
42+
sudo systemctl restart nodeserver-quasar.service;
43+
');

0 commit comments

Comments
 (0)