diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..ff9e240a1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: node_js +sudo: false +dist: trusty +node_js: + - 10.9.0 +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + chrome: stable +branches: + except: + - g3 +cache: + yarn: true + directories: + - "./node_modules" +before_install: + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0 + - export PATH="$HOME/.yarn/bin:$PATH" +script: + - "./scripts/deploy/publish-docs-content.sh" + - "./scripts/deploy/deploy-cn.sh" diff --git a/package.json b/package.json index 3a0560798..45f49cdc5 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@bazel/ibazel": "^0.14.0", "@bazel/jasmine": "^2.3.2", "@bazel/karma": "^2.3.2", - "@bazel/protractor": "^2.3.2", + "@bazel/protractor": "^3.0.0", "@bazel/rollup": "^2.3.2", "@bazel/terser": "^2.3.2", "@bazel/typescript": "^2.3.2", diff --git a/scripts/deploy/deploy-cn.sh b/scripts/deploy/deploy-cn.sh new file mode 100755 index 000000000..01cbdaf05 --- /dev/null +++ b/scripts/deploy/deploy-cn.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -x +set -e + +git clone https://github.com/ng-docs/material.github.io.git + +cd ./material.github.io + +npm i + +./scripts/ci/deploy-cn.sh + +cd - + diff --git a/scripts/deploy/publish-docs-content.sh b/scripts/deploy/publish-docs-content.sh index 1a7de44bd..4c8e3a4b4 100755 --- a/scripts/deploy/publish-docs-content.sh +++ b/scripts/deploy/publish-docs-content.sh @@ -8,9 +8,9 @@ set -e cd "$(dirname $0)/../../" -if [ -z ${MATERIAL2_BUILDS_TOKEN} ]; then +if [ -z ${GITHUB_ACCESS_TOKEN} ]; then echo "Error: No access token for GitHub could be found." \ - "Please set the environment variable 'MATERIAL2_BUILDS_TOKEN'." + "Please set the environment variable 'GITHUB_ACCESS_TOKEN'." exit 1 fi @@ -28,13 +28,13 @@ docsContentPath="${projectPath}/tmp/material2-docs-content" examplesPackagePath="${projectPath}/dist/docs-content-pkg/" # Git clone URL for the material2-docs-content repository. -docsContentRepoUrl="https://github.com/angular/material2-docs-content" +docsContentRepoUrl="https://github.com/ng-docs/material2-docs-content" # Current version of Angular Material from the package.json file buildVersion=$(node -pe "require('./package.json').version") # Name of the branch that is currently being deployed. -branchName=${CIRCLE_BRANCH:-'master'} +branchName=${TRAVIS_BRANCH:-'master'} # Additional information about the last commit for docs-content commits. commitSha=$(git rev-parse --short HEAD) @@ -96,7 +96,7 @@ git config user.name "$commitAuthorName" git config user.email "$commitAuthorEmail" git config credential.helper "store --file=.git/credentials" -echo "https://${MATERIAL2_BUILDS_TOKEN}:@github.com" > .git/credentials +echo "https://${GITHUB_ACCESS_TOKEN}:@github.com" > .git/credentials echo "Credentials for docs-content repository are now set up. Publishing.." diff --git a/yarn.lock b/yarn.lock index 980512cad..3085ba2d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -695,10 +695,10 @@ resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-2.3.2.tgz#4120618f7edd141b155f6f830fd0f04dc748a37c" integrity sha512-+FFpem1Ul/BtqNrom8y1xPIa1cPEZeBvpao8BRLfQt46r7Nk9u11KI8ylNFk+yIQVhFqAD3JBaL3sbLAU7BJ5Q== -"@bazel/protractor@^2.3.2": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-2.3.2.tgz#a57daa9488c40fa30843947f26474891db130229" - integrity sha512-VOKjJjvcO5RSoQX4nNeI41grgFc3j5xirxF26nF+MU0ePg+7giKVZWDtegLO2QRfMfFKjvzpT6HMlzd2GvxI+A== +"@bazel/protractor@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@bazel/protractor/-/protractor-3.0.0.tgz#f1bc7daee3a6a3a2a7add091c45687f72863aee8" + integrity sha512-S1TS5llnhO9kf/81he2WD3dv+NoWbNnW5LQHZPPIcUO4Pv81XiF8YZ3AahY3wcpeR+r7wKnt2XO4qrOZt/gL9g== "@bazel/rollup@^2.3.2": version "2.3.2"