added .travis_deploy.sh

This commit is contained in:
Szekeres Bálint 2018-07-01 16:56:22 +02:00
parent 8a8a2d796b
commit 3bee212d2b
2 changed files with 19 additions and 4 deletions

View File

@ -25,9 +25,6 @@ before_deploy:
deploy:
provider: script
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/
script: bash .travis_deploy.sh
on:
branch: master

18
.travis_deploy.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
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/