language: node_js node_js: - "node" addons: ssh_known_hosts: nginxconfig.io cache: directories: - ~/.npm - ~/.cache - node_modules install: - npm ci script: - npm run test before_deploy: - openssl aes-256-cbc -K $encrypted_c855341ef4be_key -iv $encrypted_c855341ef4be_iv -in .deploy_rsa.enc -out /tmp/deploy_rsa -d - eval "$(ssh-agent -s)" - chmod 600 /tmp/deploy_rsa - ssh-add /tmp/deploy_rsa 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/ on: branch: master