From d18b72f2681e42ea0fbade2ec39cf2bb87ff744e Mon Sep 17 00:00:00 2001 From: Stephan Meijer Date: Mon, 3 Oct 2022 23:10:41 +0200 Subject: [PATCH] ci: only commit to gh-pages when there are changes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68ae15d3e..18a54cbcf 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "docz:dev": "docz dev", "docz:build": "docz build --base /leaflet-geosearch/", "docz:serve": "docz build && docz serve", - "docs:update": "run-s clean build docz:build && git checkout gh-pages && find . -maxdepth 1 -type f -not -path '*/\\.*' -delete && cp -r .docz/dist/* . && git add . && git commit -m \"update docs\" && git checkout - && git push origin gh-pages", + "docs:update": "run-s clean build docz:build && git checkout gh-pages && find . -maxdepth 1 -type f -not -path '*/\\.*' -delete && cp -r .docz/dist/* . && git add . && (git diff --exit-code || git commit -m \"update docs\") && git checkout - && git push origin gh-pages", "prepublish": "run-s test clean build", "ci:lint": "eslint '{docs,src,test}/**/*.{js,ts,tsx}' -c ./.eslintrc.js", "ci:tsc": "tsc --noEmit --project ./tsconfig.json",