mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
bugfix - repair PR CI - skip deploy dep init on PRs
This commit is contained in:
parent
6f5b9fb528
commit
4ca3b129e2
2 changed files with 21 additions and 9 deletions
11
.travis.yml
11
.travis.yml
|
@ -9,11 +9,10 @@ env:
|
||||||
global:
|
global:
|
||||||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
||||||
- CXX=g++-4.8
|
- CXX=g++-4.8
|
||||||
- secure: aXYO6rBvt1dONEoYw0tScSTAoM+la0nfy7CJw/DTxhN05YjayJqLreZXEnHgCweeFyVIgmMJags0VAKfuUFPm8x5DOl7GF1t0KcvPb8acihgWS2p6pIeM7zJf3maGoC/AcOlvBZHMQcZAHsNi1O1Oc/+G/bvM3PaXXlEHb9cMbn8Kz+CzhMqRNMfu8c2REWB4OsR1HXf1KRTE7p4LhDgs7e9+0tDlfORID4jt9YgSou6flSjfovDNO3IWFvhIiwvipwSNw7XdCgPqyCoHjMFF0OctOKEwUnbkYt9ICEKbnmakqduShZVpKzhRI09dvmBks/t8ZJifopEjC+sxeQV9gWc/DALKgEeqIaKf4PQKfFs7OhksOaWhjxo17RQsUX3uMNIjuaszgh5Z2ppG/a4DQi1OqLOApp5AcDcGfh8u91E2nVUEtRgikQoxy5dwcAXgW8iu/ROVD/X0Vp7siKEchyek68SkOy6VK/fKa/sJX7zddIy8kx2bIeUnqR0yOD3yIzZGRinWm4R98DwMd38DuE+qdgVVO2n5npfSxfkvG67sahEGQ0UZWFZOi8le3FOR2f+LNqcA9NAlOeH14MQW8vd5MTbguUBeDew1E+NSQyT6P1K1bJHCio/OPi1TiaUSXXFeuuKqyC95VmD6Ln5uKDoo4DGg2JBgl2whkIGLpI=
|
|
||||||
sudo: false
|
sudo: false
|
||||||
addons:
|
addons:
|
||||||
ssh_known_hosts:
|
ssh_known_hosts:
|
||||||
- $hostname
|
- www-test.dash.org
|
||||||
- 146.185.153.42
|
- 146.185.153.42
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -21,16 +20,10 @@ addons:
|
||||||
packages:
|
packages:
|
||||||
- g++-4.8
|
- g++-4.8
|
||||||
before_install:
|
before_install:
|
||||||
- openssl aes-256-cbc -k "$dash_org_pem_pass" -in dash.org-test-web.pem.enc -out dash.org-test-web.pem -d
|
|
||||||
- rvm install 2.3.1
|
- rvm install 2.3.1
|
||||||
before_deploy:
|
|
||||||
- eval "$(ssh-agent -s)"
|
|
||||||
- chmod 600 $TRAVIS_BUILD_DIR/$IdentityFile
|
|
||||||
- ssh-add $TRAVIS_BUILD_DIR/$IdentityFile
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
script: rsync -r -c -v --delete-after --exclude-from 'ciexclude.txt' $TRAVIS_BUILD_DIR/_site/
|
script: test $TRAVIS_TEST_RESULT = 0 && script/deploy-rsync.sh
|
||||||
$user@$hostname:$production_path
|
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
19
script/deploy-rsync.sh
Executable file
19
script/deploy-rsync.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# punt if PR
|
||||||
|
if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then
|
||||||
|
echo "IS PULL REQUEST: Skipping deploy rsync"
|
||||||
|
elif [[ ! -z "$dash_org_pem_pass" ]]; then
|
||||||
|
echo -n "DEPLOY - decrypting key..."
|
||||||
|
openssl aes-256-cbc -k "$dash_org_pem_pass" -in dash.org-test-web.pem.enc -out dash.org-test-web.pem -d
|
||||||
|
chmod 600 dash.org-test-web.pem
|
||||||
|
echo "DONE"
|
||||||
|
echo "DEPLOY - copying content..."
|
||||||
|
export RSYNC_RSH='ssh -i dash.org-test-web.pem'
|
||||||
|
rsync -r -c -v --delete-after --exclude-from 'ciexclude.txt' $TRAVIS_BUILD_DIR/_site/ $user@$hostname:$production_path
|
||||||
|
echo "DONE"
|
||||||
|
else
|
||||||
|
echo "SKIPPING SITE DEPLOY "
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue