travis rsync

This commit is contained in:
Szekeres Bálint 2018-07-01 15:50:15 +02:00
parent bcb11e1e14
commit c237dd925d
4 changed files with 7 additions and 3 deletions

Binary file not shown.

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
node_modules
cypress/videos
.deploy_rsa
.deploy_rsa.pub

View File

@ -9,6 +9,7 @@ addons:
cache:
directories:
- ~/.npm
- ~/.cache
- node_modules
install:
@ -22,10 +23,11 @@ before_deploy:
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
- npm run build:prod
- find public -type f -name "*.html" -exec sed -i -e "s/COMMIT_HASH/$TRAVIS_COMMIT/" {} \;
deploy:
provider: script
script: ssh -q -l root nginxconfig.io "sudo -u www-data -H sh -c 'cd /var/www/nginxconfig.io; git reset --hard && git pull origin master && find . -type f -name '*.html' -exec sed -i -e \"s/COMMIT_HASH/$TRAVIS_COMMIT/\" {} \;'"
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
on:
branch: master

View File

@ -35,7 +35,7 @@
"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",
"test:debug": "start-server-and-test start http://localhost:8080 cypress:open",
"cypress:run": "cypress run",
"cypress:run": "cypress run --record false",
"cypress:open": "cypress open"
}
}