From 607ec9ad29368e43f9a1486d50e5d27fa4621aa1 Mon Sep 17 00:00:00 2001 From: Fabien Winkler Date: Mon, 8 Jan 2024 20:33:31 +0100 Subject: [PATCH] chore: add deploy script --- package.json | 3 ++- scripts/deploy.sh | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 scripts/deploy.sh diff --git a/package.json b/package.json index 4c32bcc..c586ca9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "release": "npm run build && standard-version", "release:patch": "npm run build && standard-version --release-as patch && git push --follow-tags origin master && npm publish --access public", "release:minor": "npm run build && standard-version --release-as minor && git push --follow-tags origin master && npm publish --access public", - "release:major": "npm run build && standard-version --release-as major && git push --follow-tags origin master && npm publish --access public" + "release:major": "npm run build && standard-version --release-as major && git push --follow-tags origin master && npm publish --access public", + "deploy": "sh scripts/deploy.sh" }, "devDependencies": { "@commitlint/cli": "^17.7.2", diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 0000000..055f977 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +cd docs/ && yarn build + +# navigate into the build output directory +cd build + + +git init +git add -A +git commit -m 'deploy' + +# if you are deploying to https://github.com//.git +git push -f https://github.com/fabienwnklr/drawer-doc.git master + +cd - \ No newline at end of file