travis rsync
parent
c237dd925d
commit
dac68ae819
11
.travis.yml
11
.travis.yml
|
@ -1,7 +1,7 @@
|
|||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "lts/*"
|
||||
- "node"
|
||||
|
||||
addons:
|
||||
ssh_known_hosts: nginxconfig.io
|
||||
|
@ -13,7 +13,7 @@ cache:
|
|||
- node_modules
|
||||
|
||||
install:
|
||||
- npm install
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- npm run test
|
||||
|
@ -23,11 +23,12 @@ before_deploy:
|
|||
- eval "$(ssh-agent -s)"
|
||||
- chmod 600 /tmp/deploy_rsa
|
||||
- ssh-add /tmp/deploy_rsa
|
||||
- find public -type f -name "*.html" -exec sed -i -e "s/COMMIT_HASH/$TRAVIS_COMMIT/" {} \;
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: rsync --checksum --delete --delete-after --force --ignore-errors --links --recursive --exclude="/node_modules/*" --exclude="/cypress/videos/*" ./ www-data@nginxconfig.io:/var/www/nginxconfig.io/
|
||||
skip_cleanup: true
|
||||
script:
|
||||
- npm run build:prod
|
||||
- find public -type f -name "*.html" -exec sed -i -e "s/COMMIT_HASH/$TRAVIS_COMMIT/" {} \;
|
||||
- rsync --checksum --delete --delete-after --force --ignore-errors --links --recursive --stats --verbose --exclude="/node_modules*" --exclude="/cypress/videos*" ./ www-data@nginxconfig.io:/var/www/nginxconfig.io/
|
||||
on:
|
||||
branch: master
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"start-server-and-test": "^1.5.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "http-server",
|
||||
"start": "npm run build && http-server",
|
||||
"build": "node-sass --source-map=public/assets/css/app.min.css.map resources/scss/app.scss public/assets/css/app.min.css",
|
||||
"build:prod": "node-sass --output-style=compressed resources/scss/app.scss public/assets/css/app.min.css",
|
||||
"test": "start-server-and-test start http://localhost:8080 cypress:run",
|
||||
|
|
Loading…
Reference in New Issue