From 12717ff7d533e81c371ffc18dfa82d95d55c007d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 9 Nov 2018 12:48:41 +0100 Subject: [PATCH] Tweak build --- azure-pipelines.yml | 6 +++++- build/publish-website.sh | 13 +++++++++++++ package.json | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 build/publish-website.sh diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 35e8d83f..f05c0b12 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,4 +12,8 @@ steps: - script: | npm install npm run website - displayName: 'Build and publish website' \ No newline at end of file + displayName: 'Build website' + +- script: | + ./build/publish-website.sh + displayName: 'Publish website' \ No newline at end of file diff --git a/build/publish-website.sh b/build/publish-website.sh new file mode 100755 index 00000000..f6303057 --- /dev/null +++ b/build/publish-website.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +REMOTE_URL="$(git remote get-url origin)" +COMMITTER_USER_NAME="$(git log --format='%an' -1)" +COMMITTER_EMAIL="$(git log --format='%ae' -1)" + +cd ../monaco-editor-website +git config user.name "${COMMITTER_USER_NAME}" +git config user.email "${COMMITTER_EMAIL}" +git remote add origin "${REMOTE_URL}" +git checkout -b gh-pages +git add . +git commit -m "Publish website" diff --git a/package.json b/package.json index 7276cc98..3df82ca7 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "scripts": { "simpleserver": "gulp simpleserver", "release": "gulp release", - "website": "gulp website" + "website": "gulp website", + "build-website": "gulp build-website" }, "typings": "./esm/vs/editor/editor.api.d.ts", "module": "./esm/vs/editor/editor.main.js",