Skip to content

Commit

Permalink
Stop deploying to the old server
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed Dec 5, 2017
1 parent c0b7018 commit 7423ed1
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions resources.whatwg.org/build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ BRANCHES_DIR="branch-snapshots"
# Optional environment variables (won't be set for local deploys)
TRAVIS=${TRAVIS:-false}
TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST:-false}
DEPLOY_USER=${DEPLOY_USER:-}
SERVER=${SERVER:-"75.119.197.251"}
SERVER_PUBLIC_KEY=${SERVER_PUBLIC_KEY:-"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDP7zWfhJdjre9BHhfOtN52v6kIaDM/1kEJV4HqinvLP2hzworwNBmTtAlIMS2JJzSiE+9WcvSbSqmw7FKmNVGtvCd/CNJJkdAOEzYFBntYLf4cwNozCRmRI0O0awTaekIm03pzLO+iJm0+xmdCjIJNDW1v8B7SwXR9t4ElYNfhYD4HAT+aP+qs6CquBbOPfVdPgQMar6iDocAOQuBFBaUHJxPGMAG0qkVRJSwS4gi8VIXNbFrLCCXnwDC4REN05J7q7w90/8/Xjt0q+im2sBUxoXcHAl38ZkHeFJry/He2CiCc8YPoOAWmM8Vd0Ukc4SYZ99UfW/bxDroLHobLQ9Eh"}
ENCRYPTION_LABEL=${ENCRYPTION_LABEL:-}
SERVER="165.227.248.76"
SERVER_PUBLIC_KEY="ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDt6Igtp73aTOYXuFb8qLtgs80wWF6cNi3/AItpWAMpX3PymUw7stU7Pi+IoBJz21nfgmxaKp3gfSe2DPNt06l8="
EXTRA_FILES=${EXTRA_FILES:-}
POST_BUILD_STEP=${POST_BUILD_STEP:-}

# New server, see https://github.com/whatwg/misc-server/issues/7
NEW_SERVER="165.227.248.76"
NEW_SERVER_PUBLIC_KEY="ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDt6Igtp73aTOYXuFb8qLtgs80wWF6cNi3/AItpWAMpX3PymUw7stU7Pi+IoBJz21nfgmxaKp3gfSe2DPNt06l8="

# HTML checker filter passed to vnu.jar --filterpattern
CHECKER_FILTER=${CHECKER_FILTER:-}

Expand All @@ -41,7 +37,7 @@ if [[ "$TRAVIS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" ]]; then
exit 0
fi

if [[ "$TRAVIS" == "true" && "$DEPLOY_USER" == "" ]]; then
if [[ "$TRAVIS" == "true" && "$ENCRYPTION_LABEL" == "" ]]; then
echo "No deploy credentials present; deploy cannot continue"
exit 1
fi
Expand Down Expand Up @@ -143,14 +139,10 @@ if [[ "$TRAVIS" == "true" ]]; then
eval "$(ssh-agent -s)"
ssh-add deploy_key

# scp to the WHATWG server
# rsync to the WHATWG server. No --delete as that would require extra care
# to not delete snapshots.
echo "$SERVER $SERVER_PUBLIC_KEY" > known_hosts
scp -r -o UserKnownHostsFile=known_hosts "$WEB_ROOT" "$DEPLOY_USER@$SERVER":

# rsync to the new WHATWG server. No --delete as that would require extra
# care to not delete snapshots.
echo "$NEW_SERVER $NEW_SERVER_PUBLIC_KEY" > known_hosts
rsync --rsh="ssh -o UserKnownHostsFile=known_hosts" --verbose \
--archive --chmod=D755,F644 --compress \
"$WEB_ROOT" deploy@$NEW_SERVER:/var/www/
"$WEB_ROOT" deploy@$SERVER:/var/www/
fi

0 comments on commit 7423ed1

Please sign in to comment.