浏览代码

More website scripts

Alex Dima 9 年之前
父节点
当前提交
66cbc99a1e
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      gulpfile.js

+ 16 - 0
gulpfile.js

@@ -319,6 +319,22 @@ gulp.task('website', ['clean-website', 'playground-samples'], function() {
 			cp.execSync('npm install monaco-editor', {
 				cwd: path.join(__dirname, '../monaco-editor-website')
 			});
+			cp.execSync('git init', {
+				cwd: path.join(__dirname, '../monaco-editor-website')
+			});
+			cp.execSync('git checkout -b gh-pages', {
+				cwd: path.join(__dirname, '../monaco-editor-website')
+			});
+			cp.execSync('git add .', {
+				cwd: path.join(__dirname, '../monaco-editor-website')
+			});
+			cp.execSync('git commit -m "Publish website"', {
+				cwd: path.join(__dirname, '../monaco-editor-website')
+			});
+			cp.execSync('git remote add origin https://github.com/Microsoft/monaco-editor.git', {
+				cwd: path.join(__dirname, '../monaco-editor-website')
+			});
+			console.log('RUN monaco-editor-website>git push origin gh-pages --force')
 			this.emit('end');
 		}))
 	);