diff --git a/.travis.yml b/.travis.yml index 2b5e1ce3d1..8cabf403ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ matrix: node_js: 8.9.3 dist: trusty sudo: required + addons: + chrome: stable before_install: - if [ "$TRAVIS_OS_NAME" == "linux" ]; then @@ -20,9 +22,7 @@ script: - yarn test - yarn e2e - yarn checkcommit - -addons: - chrome: stable + - yarn documentation cache: directories: diff --git a/package.json b/package.json index 5d344b3720..752f996174 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "test:nx": "yarn linknpm fast && ./scripts/test_nx.sh", "test": "yarn linknpm fast && ./scripts/test_nx.sh && ./scripts/test_schematics.sh", "checkformat": "./scripts/check_format.sh", - "documentation": "./scripts/documentation/documentation.sh && yarn format" + "documentation": "./scripts/documentation/documentation.sh && yarn format && ./scripts/documentation/check-documentation.sh" }, "devDependencies": { "@angular-devkit/architect": "~0.12.2", diff --git a/scripts/documentation/check-documentation.sh b/scripts/documentation/check-documentation.sh new file mode 100755 index 0000000000..192796e2c6 --- /dev/null +++ b/scripts/documentation/check-documentation.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if [ -z "$(git status --porcelain ./docs)" ]; then + echo "📄 Documentation not modified"; + exit 0; +else + echo "📄 Documentation has been modified, you need to commit the changes."; + git status --porcelain ./docs + exit 1; +fi \ No newline at end of file